Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/actions/build-docker-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ runs:
ALPINE_TAG: ${{ inputs.alpine-tag }}
SERVER_VERSION: ${{ steps.extract-version.outputs.server-version }}
run: |
docker buildx bake \
--push \
-f docker/docker-bake.hcl \
server admin-tools
if [ -n "${{ inputs.platform }}" ]; then
docker buildx bake \
--push \
--set "*.platform=${{ inputs.platform }}" \
-f docker/docker-bake.hcl \
server admin-tools
else
docker buildx bake \
--push \
-f docker/docker-bake.hcl \
server admin-tools
fi
Comment on lines 131 to +143

Choose a reason for hiding this comment

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

Semgrep identified a blocking 🔴 issue in your code:
Using variable interpolation ${{...}} with github context data in a run: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".

To resolve this comment:

🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by run-shell-injection.

You can view more details about this finding in the Semgrep AppSec Platform.

24 changes: 20 additions & 4 deletions .github/workflows/docker-build-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,45 @@ jobs:
echo "single-arch=" >> "$GITHUB_OUTPUT"
fi

- name: Compute push parameters
id: push-params
run: |
REF="${{ inputs.ref }}"
if [[ "$REF" == "spk/update-premature-eos" ]] || [[ "${{ inputs.push }}" == "true" ]]; then
echo "should-push=true" >> "$GITHUB_OUTPUT"
else
echo "should-push=false" >> "$GITHUB_OUTPUT"
fi
# Never tag as latest for the branch push
if [[ "$REF" == "spk/update-premature-eos" ]]; then
echo "effective-tag-latest=false" >> "$GITHUB_OUTPUT"
else
echo "effective-tag-latest=${{ inputs.tag-latest }}" >> "$GITHUB_OUTPUT"
fi

Comment on lines +64 to +77

Choose a reason for hiding this comment

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

Semgrep identified a blocking 🔴 issue in your code:
Using variable interpolation ${{...}} with github context data in a run: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".

To resolve this comment:

🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by run-shell-injection.

You can view more details about this finding in the Semgrep AppSec Platform.

- name: Build binaries
uses: ./.github/actions/build-binaries
with:
snapshot: ${{ inputs.snapshot }}
single-arch: ${{ steps.arch-param.outputs.single-arch }}

- name: Build Docker images
if: ${{ !inputs.push }}
if: ${{ steps.push-params.outputs.should-push != 'true' }}
uses: ./.github/actions/build-docker-images
with:
push: false
tag-latest: ${{ inputs.tag-latest }}
tag-latest: ${{ steps.push-params.outputs.effective-tag-latest }}
platform: ${{ inputs.platform }}
cli-version: ${{ inputs.cli-version }}
alpine-tag: ${{ inputs.alpine-tag }}
load: ${{ inputs.platform == 'linux/amd64' || inputs.platform == '' }}

- name: Build and push Docker images
if: ${{ inputs.push }}
if: ${{ steps.push-params.outputs.should-push == 'true' }}
uses: ./.github/actions/build-docker-images
with:
push: true
tag-latest: ${{ inputs.tag-latest }}
tag-latest: ${{ steps.push-params.outputs.effective-tag-latest }}
platform: ${{ inputs.platform }}
cli-version: ${{ inputs.cli-version }}
alpine-tag: ${{ inputs.alpine-tag }}
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
bench-throughput-stress-*
config-driven-throughputstress-*
logs*.json
workflow*.json
trace.txt

.tmp/
.bin/
.stamp/
Expand Down
Loading
Loading