Skip to content

chore: address zizmor findings and add github actions linting workflow - #62

Open
nscuro wants to merge 7 commits into
controlplaneio:masterfrom
nscuro:zizmor
Open

nscuro wants to merge 7 commits into
controlplaneio:masterfrom
nscuro:zizmor

Conversation

@nscuro

@nscuro nscuro commented Sep 23, 2026

Copy link
Copy Markdown

Addresses all findings reported by zizmor for the project's GitHub Actions workflows.

Adds a new workflow that runs zizmor to ensure no regressions are introduced later.

Fixes #44 by pinning the Trivy action to a digest (which happened to be a zizmor finding, too).

Addresses zizmor `artipacked` findings.

Signed-off-by: nscuro <nscuro@protonmail.com>
Closes controlplaneio#44

Signed-off-by: nscuro <nscuro@protonmail.com>
Addresses zizmor's `excessive-permissions` findings by scoping permissions to jobs, and explicitly dropping permissions at the workflow-level.

Also drops `contents: read` and `pull-requests: read` permissions entirely, since neither is required for public repositories like this one. The `attestations: write` permission was unused and thus also dropped entirely.

Signed-off-by: nscuro <nscuro@protonmail.com>
Prevents template injection through interpolation of expressions by defining env vars with their respective values, as per https://docs.zizmor.sh/audits/#remediation_30.

Also refactors `${{ env.<var> }}` expressions to their `${<var>}` shell equivalents as per the same zizmor guidance.

Signed-off-by: nscuro <nscuro@protonmail.com>
Addresses zizmor's `cache-poisoning` findings.

Note that this is practically a no-op for now because `v3` of the action has caching turned off by default: https://github.com/actions/setup-go/tree/v3#caching-dependency-files-and-build-outputs

Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
@github-advanced-security

Copy link
Copy Markdown

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.

@nscuro

nscuro commented Sep 23, 2026

Copy link
Copy Markdown
Author

Build failure is caused by Trivy, fixed in #63.

To be consistent with existing comments.

Signed-off-by: nscuro <nscuro@protonmail.com>
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.

pin Trivy action version

2 participants