Skip to content

Bp base shell steps v0.2#8

Open
sandy724 wants to merge 13 commits into
mainfrom
bp-base-shell-steps-v0.2
Open

Bp base shell steps v0.2#8
sandy724 wants to merge 13 commits into
mainfrom
bp-base-shell-steps-v0.2

Conversation

@sandy724
Copy link
Copy Markdown
Contributor

@sandy724 sandy724 commented Nov 8, 2022

No description provided.

Comment thread build.sh Outdated
@@ -1,5 +1,5 @@
#!/bin/bash
source functions.sh
source functions/functions.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Not following: functions/functions.sh: openBinaryFile: does not exist (No such file or directory) SC1091

Comment thread imageTrivyScanner.sh
@@ -1,5 +1,6 @@
#!/bin/bash
source functions.sh
source /opt/buildpiper/shell-functions/functions.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Not following: /opt/buildpiper/shell-functions/functions.sh: openBinaryFile: does not exist (No such file or directory) SC1091

Comment thread imageTrivyScanner.sh
#!/bin/bash
source functions.sh
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Not following: /opt/buildpiper/shell-functions/log-functions.sh: openBinaryFile: does not exist (No such file or directory) SC1091

Comment thread imageTrivyScanner.sh Outdated
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh

cd ${WORKSPACE}/${CODEBASE_DIR}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Use 'cd ... || exit' or 'cd ... || return' in case cd fails. SC2164

Comment thread imageTrivyScanner.sh Outdated
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh

cd ${WORKSPACE}/${CODEBASE_DIR}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Comment thread imageTrivyScanner.sh Outdated
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh

cd ${WORKSPACE}/${CODEBASE_DIR}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Comment thread filesystemTrivyScanner.sh
@@ -1,5 +1,6 @@
#!/bin/bash
source functions.sh
source /opt/buildpiper/shell-functions/functions.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Not following: /opt/buildpiper/shell-functions/functions.sh: openBinaryFile: does not exist (No such file or directory) SC1091

Comment thread filesystemTrivyScanner.sh
#!/bin/bash
source functions.sh
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Not following: /opt/buildpiper/shell-functions/log-functions.sh: openBinaryFile: does not exist (No such file or directory) SC1091

Comment thread filesystemTrivyScanner.sh
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh

cd ${WORKSPACE}/${CODEBASE_DIR}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Use 'cd ... || exit' or 'cd ... || return' in case cd fails. SC2164

Comment thread filesystemTrivyScanner.sh
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh

cd ${WORKSPACE}/${CODEBASE_DIR}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Comment thread filesystemTrivyScanner.sh
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh

cd ${WORKSPACE}/${CODEBASE_DIR}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Comment thread filesystemTrivyScanner.sh
source /opt/buildpiper/shell-functions/functions.sh
source /opt/buildpiper/shell-functions/log-functions.sh

cd ${WORKSPACE}/${CODEBASE_DIR}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[shellcheck (suggestion)] reported by reviewdog 🐶

Suggested change
cd ${WORKSPACE}/${CODEBASE_DIR}
cd "${WORKSPACE}"/"${CODEBASE_DIR}" || exit

Comment thread imageTrivyScanner.sh
trivy image -q --severity ${SCAN_SEVERITY} --exit-code 1 ${FORMAT_ARG} ${OUTPUT_ARG} ${IMAGE_NAME}:${IMAGE_TAG}
STATUS=`echo $?`
trivy image -q --severity "${SCAN_SEVERITY}" --exit-code 1 "${FORMAT_ARG}" "${OUTPUT_ARG}" "${IMAGE_NAME}":"${IMAGE_TAG}"
STATUS=$(echo $?)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[shellcheck] reported by reviewdog 🐶
Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'. SC2116

Comment thread imageTrivyScanner.sh
STATUS=$(echo $?)
fi

if [ $STATUS -eq 0 ]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Comment thread imageTrivyScanner.sh
logInfoMessage "trivy image -q --severity ${SCAN_SEVERITY} --exit-code 1 ${FORMAT_ARG} ${OUTPUT_ARG} ${IMAGE_NAME}:${IMAGE_TAG}"
trivy image -q --severity ${SCAN_SEVERITY} --exit-code 1 ${FORMAT_ARG} ${OUTPUT_ARG} ${IMAGE_NAME}:${IMAGE_TAG}
STATUS=`echo $?`
trivy image -q --severity "${SCAN_SEVERITY}" --exit-code 1 ${FORMAT_ARG} "${OUTPUT_ARG}" "${IMAGE_NAME}":"${IMAGE_TAG}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Comment thread imageTrivyScanner.sh Outdated
logInfoMessage "trivy image -q --severity ${SCAN_SEVERITY} --exit-code 1 ${FORMAT_ARG} ${OUTPUT_ARG} ${IMAGE_NAME}:${IMAGE_TAG}"
trivy image -q --severity ${SCAN_SEVERITY} --exit-code 1 ${FORMAT_ARG} ${OUTPUT_ARG} ${IMAGE_NAME}:${IMAGE_TAG}
STATUS=`echo $?`
STATUS=$(trivy image -q --severity "${SCAN_SEVERITY}" --exit-code 1 ${FORMAT_ARG} "${OUTPUT_ARG}" "${IMAGE_NAME}":"${IMAGE_TAG}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

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.

1 participant