Repository navigation
Semgrep checks and shellcheck braces checks - #835
Merged
Merged
Conversation
m-1-k-3
requested changes
Oct 18, 2023
m-1-k-3
left a comment
Member
There was a problem hiding this comment.
please review my notes and questions
| if ( ! ("${BUSYBOX}" ps | "${BUSYBOX}" grep -v grep | "${BUSYBOX}" grep -sqi "${BINARY_NAME}") ); then | ||
| "${BUSYBOX}" echo "[*] Starting $BINARY_NAME service ..." | ||
| ${BINARY} & | ||
| "${BINARY}" & |
Member
There was a problem hiding this comment.
in this BINARY variable could be something like:
binary parameter parameter ...
In this special case we can't add the "" to it.
Please, could you add a comment to ensure we do not forget about this situation?
Contributor
Author
There was a problem hiding this comment.
Ok, but I am renaming the variable to _BINARY, so semgrep won't flag it as an unquoted variable.
| while [[ "${CNT}" -lt 1000 ]]; do | ||
| CNT=$((CNT+1)) | ||
| (( "${CNT}" % 100 == 0 )) && print_output "[*] Rate limit handling ... sleep mode - ${CNT}" "no_log" | ||
| temp="$(( "${CNT}" % 100 ))" |
Member
There was a problem hiding this comment.
need to declare temp as local and capital pls.
local TMP_VAR=""
TMP_VAR=....
Contributor
Author
There was a problem hiding this comment.
why this way?
This way semgrep does not skip the analysis
|
|
||
| while read -r YARA_OUT_LINE; do | ||
| if [[ "$YARA_OUT_LINE" == *" [] [author="* ]]; then | ||
| author_string=" [] [author=" |
Contributor
Author
|
Now when running check-project.sh, semgrep does not skip any file. |
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
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.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information: