-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partial ripgrep support #1448
base: master
Are you sure you want to change the base?
partial ripgrep support #1448
Conversation
Is ripgrep already available in our docker image? |
It is available in the standard debian/kali repo. |
ok, I will build a new docker-base image for further testing. The current results are very cool! |
I did a quick benchmark yesterday with the original EMBA master branch vs the ripgrep PR:
Looks as we do not get any speedup of ripgrep. Can you also reproduce these results? |
@@ -58,7 +58,7 @@ IF20_nvd_feed() { | |||
git clone --depth 1 -b main https://github.com/EMBA-support-repos/EPSS-data.git external/EPSS-data || ( echo "Could not install EMBA component NIST EPSS data feed" && exit 1 ) | |||
fi | |||
|
|||
if [[ $(grep -l -E "cpe.*busybox:" external/nvd-json-data-feeds/* -r 2>/dev/null | wc -l) -gt 18 ]]; then | |||
if [[ $(rg -l "cpe.*busybox:" external/nvd-json-data-feeds/* 2>/dev/null | wc -l) -gt 18 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not recommend using rg in the installer as we need to install it on the host first
@@ -38,7 +38,7 @@ for STRING_ENTRY in "${STRING_ENTRY_ARR[@]}"; do | |||
|
|||
echo "[*] Testing SBOM entry ${COMPONENT//::}" | |||
|
|||
if [[ "$(grep -h "cpe.*${COMPONENT//::}:" external/nvd-json-data-feeds/* -r | wc -l 2>/dev/null)" -gt 0 ]]; then | |||
if [[ "$(rg -I -N "cpe.*${COMPONENT//::}:" external/nvd-json-data-feeds/* | wc -l 2>/dev/null)" -gt 0 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a helper script for the host and I would not recommend using rg in such a script as we need to install it on the host first
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
It uses ripgrep to search for regex.
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)? If possible add a screenshot.
It is considerably faster.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information: