Skip to content

ci: harden GitHub Actions and release workflow (AST-196208) - #407

Open
cx-lior-poterman wants to merge 14 commits into
masterfrom
AST-196208-2ms-actions-hardening
Open

cx-lior-poterman wants to merge 14 commits into
masterfrom
AST-196208-2ms-actions-hardening

Conversation

@cx-lior-poterman

Copy link
Copy Markdown
Contributor

AST-196208: includes Artur's commits from #403 (authorship kept) plus fixes on top.
Release: manual-only, tags github.sha, pushes the image before the GitHub release, blocks re-used tags, go mod verify; Dockerfile builds per TARGETARCH (arm64 fix).
CI: gosec restored, KICS moved into the required pr-validation job, secret scan runs 2ms from source with test-fixture ignores, trivy pins aligned.
Required checks run from master's copies, so this needs the maintainer bypass; after merge, update ruleset 07 (drop cx-one-scan + trivy-vulnerability-scan, add secret-scanning) and allow cgr.dev egress for KICS.

cx-artur-ribeiro and others added 14 commits November 30, 2026 11:12
AST-196208. Tag the release at github.sha (the referenced commit_and_push step never existed), push the image before creating the GitHub release, fail early when the tag already exists, and verify modules instead of running go mod tidy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AST-196208. GOARCH was hardcoded to amd64, so the linux/arm64 image shipped an amd64 binary. Use the buildx TARGETARCH build arg.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AST-196208. Keep gosec as the only SAST step left in CI; upload SARIF only from master pushes and the nightly run, where code scanning upload works. Pin both trivy steps to v0.36.0 and give the buildx steps the id their builder input refers to.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AST-196208. Move the echohq npm pre-build approach into the required pr-validation kics job and drop the duplicate kics-gh-action workflow. Keeps the full-repo scan failing on high/medium findings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AST-196208. Result ids differ between 2ms versions, so run the scanner from this commit's source instead of the unpinned checkmarx/2ms:latest image, and add the unit-test fixture ids it reports to .2ms.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AST-196208. The default branch is master, not main. Align validate-readme with setup-go v6.3.0 used by the other workflows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cx-lior-poterman
cx-lior-poterman requested a review from a team November 30, 2026 09:44
@stepsecurity-app

Copy link
Copy Markdown
Contributor

Security Policy Alert: Secret Policy Violation

This workflow run has been blocked by StepSecurity's secrets policy because it accesses secrets and the workflow file differs from the default branch.

Secret references detected:

  • secrets.CODECOV_TOKEN at line 49

To approve this workflow, please add the workflows-approved label to this PR.

Note: The label must be added by someone other than the PR author (cx-lior-poterman) or automation bots to ensure proper security review.

After the label is added, you can re-run the blocked workflow to proceed.

This workflow will be automatically approved once merged into the default branch.

For more information, see StepSecurity's Secret Exfiltration Policy documentation.

@stepsecurity-app

Copy link
Copy Markdown
Contributor

Security Policy Alert: Secret Policy Violation

This workflow run has been blocked by StepSecurity's secrets policy because it accesses secrets and the workflow file differs from the default branch.

Secret references detected:

  • secrets.ECHO_LIBRARIES_ACCESS_KEY at line 31

To approve this workflow, please add the workflows-approved label to this PR.

Note: The label must be added by someone other than the PR author (cx-lior-poterman) or automation bots to ensure proper security review.

After the label is added, you can re-run the blocked workflow to proceed.

This workflow will be automatically approved once merged into the default branch.

For more information, see StepSecurity's Secret Exfiltration Policy documentation.

@cx-artur-ribeiro cx-artur-ribeiro left a comment

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.

LGTM, thanks for the effort!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants