Skip to content

fix: address all code scanning alerts#136

Merged
derrix060 merged 1 commit intomainfrom
feat/infisical-secrets
Mar 27, 2026
Merged

fix: address all code scanning alerts#136
derrix060 merged 1 commit intomainfrom
feat/infisical-secrets

Conversation

@derrix060
Copy link
Copy Markdown
Contributor

  • Pin all 3rd party action references to commit SHAs (6 unpinned tag alerts)
  • Move ${{ inputs.* }} from run: blocks to env: blocks to prevent code injection (10 injection alerts)
  • Add persist-credentials: false to untrusted PR checkouts (2 alerts)
  • Add accepted-risk comments on pre_build_script (intentionally executed)

Copilot AI review requested due to automatic review settings March 26, 2026 15:24
Comment thread .github/workflows/helm-chart-package.yaml Fixed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to resolve GitHub code scanning alerts in reusable workflows by hardening GitHub Actions usage (pinning action refs, reducing injection risk, and tightening checkout credentials handling).

Changes:

  • Pin third-party GitHub Actions uses: references to full commit SHAs (with version annotations).
  • Reduce script-injection risk by routing inputs.* through env: in several run: steps.
  • Add persist-credentials: false to selected actions/checkout steps and add accepted-risk notes for intentionally executed scripts.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
.github/workflows/release-please.yaml Pin release-please action to a commit SHA.
.github/workflows/pre-commit.yaml Pin checkout/setup actions and pre-commit action to SHAs.
.github/workflows/pre-commit-auth.yaml Pin checkout/setup actions and pre-commit action to SHAs (auth variant).
.github/workflows/helm-chart-package.yaml Pin checkout/setup-helm/sticky-comment actions; Trivy already pinned.
.github/workflows/docker-promote-jfrog.yaml Move workflow inputs into env: for shell steps; pin JFrog CLI action to SHA.
.github/workflows/docker-promote-dockerhub.yaml Move inputs.tags/source_tag into env: for promotion step.
.github/workflows/docker-build-push-jfrog.yaml Add persist-credentials: false, route some inputs via env:, pin JFrog CLI action, add accepted-risk note.
.github/workflows/docker-build-push-dockerhub.yaml Add persist-credentials: false, add accepted-risk note, annotate pinned internal build action.
.github/workflows/commitizen.yaml Pin checkout and commitizen action to SHAs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/docker-build-push-dockerhub.yaml Outdated
Comment thread .github/workflows/commitizen.yaml Outdated
Comment thread .github/workflows/helm-chart-package.yaml
Comment thread .github/workflows/docker-promote-jfrog.yaml Outdated
Comment thread .github/workflows/docker-promote-jfrog.yaml
Comment thread .github/workflows/docker-promote-dockerhub.yaml
Comment thread .github/workflows/docker-build-push-jfrog.yaml Outdated
Comment thread .github/workflows/helm-chart-package.yaml
Comment thread .github/workflows/docker-promote-jfrog.yaml Outdated
Comment thread .github/workflows/docker-build-push-jfrog.yaml Outdated
@derrix060 derrix060 requested a review from Copilot March 26, 2026 15:50
derrix060 added a commit that referenced this pull request Mar 26, 2026
- Fix typo "Validade" -> "Validate" in docker-promote-jfrog
- Fix invalid "if: if ..." condition in helm-chart-package
- Add whitespace trimming for comma-separated tags in promote workflows
- Update SHA pin comments to exact versions (v4 -> v4.10.0)
- Remove misleading branch comments (# main, # master) from SHA pins
- Add trusted-source comment for chart env var extraction
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/helm-chart-package.yaml Outdated
Comment thread .github/workflows/helm-chart-package.yaml
Comment thread .github/workflows/helm-chart-package.yaml
Comment thread .github/workflows/docker-build-push-jfrog.yaml Outdated
Comment thread .github/workflows/docker-build-push-dockerhub.yaml Outdated
@derrix060 derrix060 requested a review from Copilot March 26, 2026 15:55
derrix060 added a commit that referenced this pull request Mar 26, 2026
- Move pre_build_script from inline run: to temp script execution
  via env var (both dockerhub and jfrog build workflows)
- Fix path concatenation bug in helm-chart diff.txt path
- Fix nested double-quote issues in PREVIOUS_VERSION/CHART_NAME/
  CHART_VERSION assignments in helm-chart-package
Comment thread .github/workflows/helm-chart-package.yaml Fixed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/docker-build-push-dockerhub.yaml
Comment thread .github/workflows/helm-chart-package.yaml Outdated
Comment thread .github/workflows/helm-chart-package.yaml Outdated
Comment thread .github/workflows/helm-chart-package.yaml Outdated
Comment thread .github/workflows/docker-promote-dockerhub.yaml Dismissed
Comment thread .github/workflows/docker-promote-jfrog.yaml Dismissed
Comment thread .github/workflows/helm-chart-package.yaml Dismissed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/helm-chart-package.yaml
Comment thread .github/workflows/docker-build-push-jfrog.yaml Outdated
Comment thread .github/workflows/docker-build-push-dockerhub.yaml Outdated
@derrix060 derrix060 requested a review from Copilot March 26, 2026 16:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/docker-promote-jfrog.yaml Outdated
Comment thread .github/workflows/docker-promote-jfrog.yaml Fixed
Security fixes across 11 workflow files:

- Pin all 3rd party action references to commit SHAs with version comments
- Move all ${{ inputs.* }}, ${{ env.* }}, ${{ steps.*.outputs.* }}, and
  ${{ job.status }} expressions from run: blocks to step env: blocks to
  prevent code injection
- Use heredoc format for all $GITHUB_ENV writes to prevent env var
  injection via newline characters
- Add persist-credentials: false to untrusted PR checkouts
- Execute pre_build_script via temp file instead of inline interpolation
  with EXIT trap for guaranteed cleanup
- Use openssl rand -hex 8 for heredoc delimiters consistently
- Fix helm-chart-package: invalid if: condition, scan-ref path separator,
  PR notification condition for reusable workflows, PREVIOUS_VERSION
  same-step usage
- Fix docker-promote-jfrog: typo, target_env validation alignment,
  whitespace trimming for comma-separated tags
- Fix docker-promote-dockerhub: whitespace trimming for tags
- Validate secret key names in get_infisical_secrets action
- Add dependency checks, path traversal validation, domain normalization,
  and workflow command escaping in get_infisical_secrets action
@derrix060 derrix060 force-pushed the feat/infisical-secrets branch from 55f51ac to cae60bd Compare March 27, 2026 07:51
@derrix060 derrix060 merged commit def5c61 into main Mar 27, 2026
2 checks passed
@derrix060 derrix060 deleted the feat/infisical-secrets branch March 27, 2026 07:52
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.

3 participants