Skip to content

Improve CI security posture: add CodeQL & zizmor workflows, fix dependabot config#725

Merged
potiuk merged 6 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/improve-security-posture
Apr 17, 2026
Merged

Improve CI security posture: add CodeQL & zizmor workflows, fix dependabot config#725
potiuk merged 6 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/improve-security-posture

Conversation

@kevinjqliu
Copy link
Copy Markdown
Contributor

@kevinjqliu kevinjqliu commented Apr 16, 2026

Changes

  • Add CodeQL workflow for GitHub Actions security scanning (codeql.yml)
  • Add zizmor workflow for Actions-specific static analysis (zizmor.yml)
  • Fix dependabot config: correct versions field to use list syntax, add license header formatting, add zizmor: ignore annotation for cooldown rule
  • Fix actor check in verify_dependabot_action.yml: use github.event.pull_request.user.login instead of github.actor to avoid false negatives when non-dependabot users interact with the PR
  • Pin matlab-actions/run-tests to v3.0.0 (zizmor fix)
  • Harden pelican/action.yml: replace inline ${{ inputs.* }} expressions in run: blocks with environment variables to prevent script injection
  • Harden stash/restore/action.yml: move ${{ inputs.clean }} into an INPUTS_CLEAN env var for the same reason
  • Pin actions/upload-artifact in stash/save/action.yml to full SHA (v7)

Validated locally

GH_TOKEN=`gh auth token` uvx zizmor --min-severity medium --min-confidence medium .github/ --fix=all

@github-advanced-security
Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread .github/actions/for-dependabot-triggered-reviews/action.yml
Comment thread .github/dependabot.yml
Comment thread .github/dependabot.yml Outdated
Comment thread pelican/action.yml
@dave2wave dave2wave requested review from potiuk and raboof April 16, 2026 21:21
@dave2wave
Copy link
Copy Markdown
Member

Harden pelican/action.yml: replace inline ${{ inputs.* }} expressions in run: blocks with environment variables to prevent script injection
Harden stash/restore/action.yml: move ${{ inputs.clean }} into an INPUTS_CLEAN env var for the same reason

These changes are breaking unless the environment variables are initialized from the action's inputs.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 16, 2026

Harden pelican/action.yml: replace inline ${{ inputs.* }} expressions in run: blocks with environment variables to prevent script injection
Harden stash/restore/action.yml: move ${{ inputs.clean }} into an INPUTS_CLEAN env var for the same reason

These changes are breaking unless the environment variables are initialized from the action's inputs.

No. All inputs are also automatically available as INPUT_ env variables https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepswith

Comment thread .github/workflows/verify_dependabot_action.yml
Comment thread .github/workflows/zizmor.yml
Comment thread stash/save/action.yml
Copy link
Copy Markdown
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Looks good. But I think we need to look at the matlab things - were it came from.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 16, 2026

Ah - it seems we have pre-release version updatred by dependabot. We should disable pre-release upates.

image

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 16, 2026

I think they changed release to "pre-release".

@potiuk potiuk requested a review from dave2wave April 16, 2026 22:28
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 16, 2026

@kevinjqliu -> the zizmor issues should be silenced. In this case we do not want to create separate env.

@dave2wave dave2wave dismissed their stale review April 16, 2026 23:05

Issue was fixed

@kevinjqliu
Copy link
Copy Markdown
Contributor Author

ci is green!

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 17, 2026

Nice!

@potiuk potiuk merged commit 27a7a95 into apache:main Apr 17, 2026
21 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/improve-security-posture branch April 17, 2026 17:57
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.

4 participants