Skip to content

chore(ci): modernize and harden CI workflows#209

Open
cblecker wants to merge 2 commits intocncf:mainfrom
cblecker:sync-workflows-modernization
Open

chore(ci): modernize and harden CI workflows#209
cblecker wants to merge 2 commits intocncf:mainfrom
cblecker:sync-workflows-modernization

Conversation

@cblecker
Copy link
Copy Markdown
Member

@cblecker cblecker commented Mar 11, 2026

Summary

  • Fix hardcoded Windows paths in syntax_check.py that caused the syntax check to always fail
  • Update actions/checkout v4→v6 and actions/setup-python v5→v6 in test-landscape-guard; pin actions/setup-go and actions/upload-artifact to SHAs in reusable-generate-sbom; add missing version comments to already-pinned SHAs; add persist-credentials: false to all checkout steps
  • Add top-level permissions: contents: none to the glossary slack notifier, pin rtCamp/action-slack-notify to SHA

Test plan

  • Verify tests/syntax_check.py runs without path errors
  • Confirm test-landscape-guard workflow passes with updated action versions
  • Verify reusable-generate-sbom workflow generates SBOMs correctly
  • Confirm sync workflows (sync-pcc-and-audit-statuses, sync-lfx-insights-health, landscape-data-content-auditor) function as before
  • Verify update_mailing_list workflow succeeds
  • Verify glossary maintainer Slack notification sends correctly on the 4th Thursday

@github-actions github-actions Bot added needs-triage Indicates an issue or PR that has not been triaged yet (has a 'triage/foo' label applied) needs-kind Indicates an issue or PR that is missing an issue type or kind (a kind/foo label) help wanted labels Mar 11, 2026
@kusari-inspector
Copy link
Copy Markdown
Contributor

Kusari Inspector

Kusari Analysis Results:

Do not proceed without addressing issues

Caution

Flagged Issues Detected
These changes contain flagged issues that may introduce security risks.

The dependency analysis found no issues. However, the code analysis identified 7 high-severity findings across 4 GitHub Actions workflow files where actions are referenced using mutable version tags (e.g., @v6) instead of immutable commit SHA hashes. This is a confirmed supply chain security risk: if any of these tags are moved or compromised by a malicious actor, the workflows will silently execute arbitrary code. The risk is significantly elevated because several of these workflows operate with elevated permissions (contents: write, pull-requests: write), meaning a compromised action could push malicious code to the repository or open fraudulent pull requests. Action items to resolve: Pin all GitHub Actions references to their full-length commit SHAs (e.g., actions/checkout@<full-sha> instead of actions/checkout@v6) in all 4 affected workflow files: discover-cncf-repos.yml, sync-cncf-projects.yml, sync-pcc-and-audit-statuses.yml, and update_mailing_list.yml.

Note

View full detailed analysis result for more information on the output and the checks that were run.

Required Code Mitigations

actions/checkout@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

actions/setup-go@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

actions/checkout@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

actions/setup-go@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

actions/checkout@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

actions/setup-python@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

actions/checkout@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.


@kusari-inspector rerun - Trigger a re-analysis of this PR
@kusari-inspector feedback [your message] - Send feedback to our AI and team
See Kusari's documentation for setup and configuration.
Commit: 471851e, performed at: 2026-03-11T20:22:57Z

Found this helpful? Give it a 👍 or 👎 reaction!

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
uses: actions/checkout@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actions/checkout@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intentional. First-party GitHub Actions (actions/*) are referenced by major version tag rather than SHA pin. Dependabot is being added (#205) to manage version updates.


- name: Setup Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5
uses: actions/setup-go@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actions/setup-go@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intentional. First-party GitHub Actions (actions/*) are referenced by major version tag rather than SHA pin. Dependabot is being added (#205) to manage version updates.

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
uses: actions/checkout@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actions/checkout@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intentional. First-party GitHub Actions (actions/*) are referenced by major version tag rather than SHA pin. Dependabot is being added (#205) to manage version updates.


- name: Setup Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5
uses: actions/setup-go@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actions/setup-go@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intentional. First-party GitHub Actions (actions/*) are referenced by major version tag rather than SHA pin. Dependabot is being added (#205) to manage version updates.

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
uses: actions/checkout@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actions/checkout@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intentional. First-party GitHub Actions (actions/*) are referenced by major version tag rather than SHA pin. Dependabot is being added (#205) to manage version updates.


- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actions/setup-python@v6 is not pinned to a specific commit hash. Pin this action to a full-length commit SHA to prevent supply chain attacks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intentional. First-party GitHub Actions (actions/*) are referenced by major version tag rather than SHA pin. Dependabot is being added (#205) to manage version updates.

Comment thread .github/workflows/update_mailing_list.yml Outdated
remind:
runs-on: ubuntu-latest
steps:
- name: "Guard: only run on 4th Thursday"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Were you removing this because in CRON you trust?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yup. Was this because something went bad?

@koksay koksay requested a review from mfahlandt March 12, 2026 08:43
@jeefy
Copy link
Copy Markdown
Member

jeefy commented Apr 20, 2026

Sorry @cblecker can you rebase and I'll review this week? 👼

@cblecker cblecker force-pushed the sync-workflows-modernization branch from 471851e to b925526 Compare April 20, 2026 23:05
@cblecker cblecker changed the title Modernize sync and utility workflows chore(ci): modernize and harden CI workflows Apr 20, 2026
Paths pointed to a developer's local Windows machine instead of
repo-relative paths, causing the syntax check to always fail.

Assisted-by: Claude:claude-sonnet-4-6[1m]
Signed-off-by: Christoph Blecker <admin@toph.ca>
Update actions/checkout from v4 to v6 and actions/setup-python from v5
to v6 in test-landscape-guard, pin actions/setup-go and
actions/upload-artifact to SHAs in reusable-generate-sbom, add missing
version comments to already-pinned checkout SHAs, and add
persist-credentials: false to all checkout steps.

Assisted-by: Claude:claude-sonnet-4-6[1m]
Signed-off-by: Christoph Blecker <admin@toph.ca>
@cblecker cblecker force-pushed the sync-workflows-modernization branch from b925526 to 9537d53 Compare April 21, 2026 21:37
@cblecker
Copy link
Copy Markdown
Member Author

@jeefy ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted needs-kind Indicates an issue or PR that is missing an issue type or kind (a kind/foo label) needs-triage Indicates an issue or PR that has not been triaged yet (has a 'triage/foo' label applied)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants