Skip to content

Semgrep checks and shellcheck braces checks - #835

Merged
m-1-k-3 merged 7 commits into
e-m-b-a:masterfrom
HoxhaEndri:master
Oct 24, 2023
Merged

m-1-k-3 merged 7 commits into
e-m-b-a:masterfrom
HoxhaEndri:master

Conversation

@HoxhaEndri

Copy link
Copy Markdown
Contributor
  • 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:

@m-1-k-3 m-1-k-3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}" &

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but I am renaming the variable to _BINARY, so semgrep won't flag it as an unquoted variable.

Comment thread modules/Q02_openai_question.sh Outdated
while [[ "${CNT}" -lt 1000 ]]; do
CNT=$((CNT+1))
(( "${CNT}" % 100 == 0 )) && print_output "[*] Rate limit handling ... sleep mode - ${CNT}" "no_log"
temp="$(( "${CNT}" % 100 ))"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this way?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to declare temp as local and capital pls.

local TMP_VAR=""
TMP_VAR=....

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this way?

This way semgrep does not skip the analysis

Comment thread modules/S110_yara_check.sh Outdated

while read -r YARA_OUT_LINE; do
if [[ "$YARA_OUT_LINE" == *" [] [author="* ]]; then
author_string=" [] [author="

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capital and local

Comment thread modules/S22_php_check.sh
@HoxhaEndri

Copy link
Copy Markdown
Contributor Author

Now when running check-project.sh, semgrep does not skip any file.

@m-1-k-3 m-1-k-3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

@m-1-k-3
m-1-k-3 merged commit 654d5ea into e-m-b-a:master Oct 24, 2023
@m-1-k-3 m-1-k-3 mentioned this pull request Oct 24, 2023
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants