Skip to content

fix(ci): security hardening - #717

Merged
armando-rodriguez-cko merged 2 commits into
masterfrom
fix/INT-1786-security-hardening
Nov 25, 2026
Merged

armando-rodriguez-cko merged 2 commits into
masterfrom
fix/INT-1786-security-hardening

Conversation

@david-ruiz-cko

@david-ruiz-cko david-ruiz-cko commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Security hardening of the build and publishing workflows. The release workflow is split into
separate jobs, and the artifacts are signed and uploaded by a job that runs no build tooling.
Gradle verifies every dependency, plugin and its own distribution by checksum, and the workflows
use explicit permissions and actions pinned by commit.

Changes

  • .github/workflows/build-release.yml: five jobs (build, verify, test, publish,
    release). Only a release commit publishes (first line Release <version>, the release PR
    title, for the version in gradle.properties); its message becomes the release notes. Other
    changes to gradle.properties build and test only, and a Release line that names another
    version fails the run. verify checks the built files on a separate runner. publish runs in
    the maven-central environment, checks the files against the verify job's checksums, signs
    them and uploads them with the Maven Central Publisher API. A version already on Maven Central
    is not uploaded again, and re-running a run finishes a release it left unfinished. The GitHub
    release is created with gh release create.
  • .github/workflows/build-master.yml, build-pull-request.yml, codeql-analysis.yml: explicit
    permissions, actions pinned by commit SHA, checkout without persisted credentials, the
    maintained wrapper validation action, job timeouts, unused environment variables removed;
    CodeQL builds explicitly. Same Gradle tasks as before.
  • .github/scripts/gradle.sh (new): the way every workflow runs Gradle; checks the build
    configuration and that dependency verification is in effect before building.
  • .github/scripts/verify-artifacts.py (new): checks the release files before they are signed.
  • .github/scripts/update-verification-metadata.sh (new): regenerates the dependency checksums.
  • build.gradle: release files staged to a local directory; signing and upload moved to the
    workflow (signing and nexus publishing plugins removed).
  • gradle/verification-metadata.xml (new): checksums of every dependency and plugin.
  • gradle/wrapper/gradle-wrapper.properties: distribution checksum.

After changing a dependency or plugin version (Dependabot pull requests included), run
.github/scripts/update-verification-metadata.sh and commit the result; CI fails otherwise.
The published artifacts do not change: the staged POM is the same as the one published for
8.9.0.

Merging this PR does not publish (it does not change gradle.properties). Before the next
release, a repository admin creates the maven-central environment and moves the signing and
Maven Central secrets into it.

API Reference

None.

Breaking changes

None.

Tests

  • Existing tests pass (test --fail-fast check: 3032 tests, 0 failures)
  • Serialization tests cover every new or changed property: not applicable, no model changed
  • README updated if documented usage changed: not needed, the documented build commands are unchanged
  • Workflows checked with actionlint and zizmor; scripts with shellcheck
  • The build, verify, publish and release scripts executed locally in containers, including
    failure cases
  • Dependency verification checked: a changed checksum, an unlisted dependency and a wrong
    distribution checksum fail the build

Related

None.

@david-ruiz-cko
david-ruiz-cko requested a review from a team November 23, 2026 10:44
@agent-wall-e

agent-wall-e Bot commented Nov 23, 2026

Copy link
Copy Markdown

🔴 Risk Classification: MAJOR

Approval route: AI Review + Human Approval Required
Rollback controls: Change-freeze window + documented rollback plan

Classification reasons

  • security_sensitive_path:.github/workflows/build-master.yml
  • security_sensitive_path:.github/workflows/build-pull-request.yml
  • security_sensitive_path:.github/workflows/build-release.yml
  • security_sensitive_path:.github/workflows/codeql-analysis.yml

Operational gates

  • ✅ jira_ticket (INT-1786)
  • ✅ independent_review

Files analysed: 10


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Nov 23, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
security_sensitive_path — .github/workflows/build-master.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/build-pull-request.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/build-release.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/codeql-analysis.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@agent-wall-e

agent-wall-e Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🔵 Advisory review: Sound, but needs your judgement

This PR needs a human approval. The code itself reads as correct; whether it should land depends on context I don't have.

This is a substantial security-hardening overhaul: pinned actions, dependency verification, split release pipeline, and a signing/upload job isolated in a dedicated environment. The changes are technically coherent and the stated intent matches the diff, but several operational assumptions require human validation before the next release.

For you to decide

  • The maven-central environment referenced in build-release.yml (publish job) does not exist yet per the PR description — a human must confirm it will be created with the correct secrets (GPG_KEY, GPG_PASSPHRASE, SONATYPE_USERNAME, SONATYPE_PASSWORD) before any release is attempted, or the publish job will silently have no signing material.
  • The publishing-secrets check in the build job warns (non-fatal) when secrets are visible outside the environment on a non-release commit, but only fails on a release commit — a reviewer should confirm that none of GPG_KEY, GPG_PASSPHRASE, SONATYPE_USERNAME, SONATYPE_PASSWORD are currently set as repository/org-level secrets, otherwise a non-release push would proceed with a warning but no failure.
  • The verify-artifacts.py script hardcodes VARIANT_ATTRIBUTES with org.gradle.jvm.version: 8 — if the toolchain or sourceCompatibility ever changes this will produce a false negative; the reviewer should confirm the value matches what Gradle actually writes for the current build config.
  • The gradle.sh probe-run mechanism (injecting a fake artifact to verify that dependency verification rejects it) is clever but the truncated diff means the full init script content is not visible — the reviewer must check that the probe's init script cannot itself be a supply-chain vector (e.g. it writes to a temp dir and is never committed).
  • The codeql-analysis.yml removes actions: read from the job-level permissions while adding contents: read at the workflow level — the reviewer should verify CodeQL's upload step does not require actions: read in the new configuration.
  • The cache key in build-pull-request.yml now includes gradle/verification-metadata.xml and gradle/wrapper/gradle-wrapper.properties, which is correct and an improvement, but it still only caches ~/.gradle/caches — the Gradle wrapper distribution itself (~/.gradle/wrapper/dists) is not cached, so every PR run re-downloads the distribution unless the runner image includes it.
  • The update-verification-metadata.sh script uses --init-script with --write-verification-metadata, which bypasses normal verification for that regeneration run — this is expected behaviour but means the regeneration script itself is a privileged operation; a reviewer should confirm the runbook makes clear it must only be run locally by a trusted developer.
  • The build-release.yml release notes are taken verbatim from the commit message body (github.event.head_commit.message minus the subject line) — there is no sanitisation before it is passed to gh release create; a reviewer should confirm whether shell-quoting in the (truncated) release step is sufficient to prevent injection.
  • The concurrency block sets cancel-in-progress: false, which is correct for a release workflow, but means a stuck run blocks all subsequent pushes to master that touch gradle.properties indefinitely — confirm this is the desired operational behaviour.

⚠️ The diff was too large to read in full, so this review covers only part of the change.


This is not an approval. wall-e cannot auto-approve this PR — it is an opinion to help whoever does. Advisory review · us.anthropic.claude-sonnet-4-6 · wall-e 2026.06.19-02

@agent-wall-e

agent-wall-e Bot commented Nov 23, 2026

Copy link
Copy Markdown

🔴 Risk Classification: MAJOR

Approval route: AI Review + Human Approval Required
Rollback controls: Change-freeze window + documented rollback plan

Classification reasons

  • security_sensitive_path:.github/workflows/build-master.yml
  • security_sensitive_path:.github/workflows/build-pull-request.yml
  • security_sensitive_path:.github/workflows/build-release.yml
  • security_sensitive_path:.github/workflows/codeql-analysis.yml

Operational gates

  • ✅ jira_ticket (INT-1786)
  • ✅ independent_review

Files analysed: 10


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Nov 23, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
security_sensitive_path — .github/workflows/build-master.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/build-pull-request.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/build-release.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/codeql-analysis.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@david-ruiz-cko david-ruiz-cko changed the title fix(ci) - new CI pipeline fix(ci) - security hardening Nov 23, 2026
@david-ruiz-cko david-ruiz-cko changed the title fix(ci) - security hardening fix(ci): security hardening Nov 23, 2026
@armando-rodriguez-cko
armando-rodriguez-cko force-pushed the fix/INT-1786-security-hardening branch from d7867d2 to 0161c7c Compare November 25, 2026 17:07
@agent-wall-e

agent-wall-e Bot commented Nov 25, 2026

Copy link
Copy Markdown

🔴 Risk Classification: MAJOR

Approval route: AI Review + Human Approval Required
Rollback controls: Change-freeze window + documented rollback plan

Classification reasons

  • security_sensitive_path:.github/workflows/build-master.yml
  • security_sensitive_path:.github/workflows/build-pull-request.yml
  • security_sensitive_path:.github/workflows/build-release.yml
  • security_sensitive_path:.github/workflows/codeql-analysis.yml

Operational gates

  • ✅ jira_ticket (INT-1786)
  • ✅ independent_review

Files analysed: 10


wall-e 2026.06.19-02 · policy 6b4ce2b3b45a…

@agent-wall-e

agent-wall-e Bot commented Nov 25, 2026

Copy link
Copy Markdown
🔬 Debug — why this classification?

Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.

Reason code Kind Clause Meaning
security_sensitive_path — .github/workflows/build-master.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/build-pull-request.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/build-release.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).
security_sensitive_path — .github/workflows/codeql-analysis.yml classifying §2.1 M4/M5 Path matched a sensitive pattern (auth, secrets, crypto, PCI, migrations, network IaC).

Kinds:

  • classifying — this rule contributed to the chosen tier.
  • informational — context only; did not by itself decide the tier.

See issue #3 for the proposal to formalise this map as Appendix A of the standards doc.

wall-e 2026.06.19-02 · debug

@sonarqubecloud

Copy link
Copy Markdown

@armando-rodriguez-cko
armando-rodriguez-cko merged commit 1565cd4 into master Nov 25, 2026
6 checks passed
@armando-rodriguez-cko
armando-rodriguez-cko deleted the fix/INT-1786-security-hardening branch November 25, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants