Skip to content

fix: using variable interpolation `${{ in build-and-push-image.yml (y...#5274

Open
orbisai0security wants to merge 1 commit intofatedier:devfrom
orbisai0security:fix-fix-shell-injection-build-and-push-image
Open

fix: using variable interpolation `${{ in build-and-push-image.yml (y...#5274
orbisai0security wants to merge 1 commit intofatedier:devfrom
orbisai0security:fix-fix-shell-injection-build-and-push-image

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix high severity security issue in .github/workflows/build-and-push-image.yml.

Vulnerability

Field Value
ID yaml.github-actions.security.run-shell-injection.run-shell-injection
Severity HIGH
Scanner semgrep
Rule yaml.github-actions.security.run-shell-injection.run-shell-injection
File .github/workflows/build-and-push-image.yml:34

Description: 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".

Changes

  • .github/workflows/build-and-push-image.yml

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • Code review passed

Automated security fix by OrbisAI Security

Using variable interpolation `${{
Addresses yaml.github-actions.security.run-shell-injection.run-shell-injection
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