Skip to content

CID-5992: read-only default permissions for gradle-build workflow - #164

Merged
AlperCezibarakLeanix merged 2 commits into
mainfrom
feature/CID-5992/github-hardening-controls
Dec 2, 2026
Merged

AlperCezibarakLeanix merged 2 commits into
mainfrom
feature/CID-5992/github-hardening-controls

Conversation

@AlperCezibarakLeanix

@AlperCezibarakLeanix AlperCezibarakLeanix commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

CID-5992 — GitHub Hardening Controls (Project Granite)

Gap analysis of this repo against SAP OSPO GitHub Hardening Controls. This PR applies the one code-level hardening change in scope.

Change

  • Add read-only default permissions to gradle-build.yml (permissions: contents: read). It was the only workflow without an explicit permissions: block (per CPAWGOSS-1209, the "must remediate" class). Its jobs only build/test, so read-only is sufficient. Validated by two independent reviews: no step needs more than contents: read.

Gap analysis result (no other code changes needed)

  • Control 1 CI on Actions only ✅ · Control 2 publishes container to ghcr.io (approved platform) + provenance, npm/PyPI Trusted Publishing N/A ✅ · Control 3 no pull_request_target ✅ · Control 4 0 stored secrets, only GITHUB_TOKEN ✅ · Control 5 no release branches (releases are tags off main) ✅ · Control 8 active ✅.

Out of scope here

  • Unapproved third-party actions (K-Phoen/semver-release-action, release-drafter/release-drafter) are tracked separately in CID-5993 (remove/replace, both repos). An earlier commit on this branch that SHA-pinned semver-release-action has been reverted — pinning an unapproved action does not satisfy the allow-list; it must be removed/replaced under CID-5993.

Needs repo-admin (not code)

  • Control 7 least-privilege review — confirm @leanix/team-cider ≤ Write unless Admin needed, minimal admins, no bot/app with Admin.
  • Confirm the repo/org default workflow-token permission is read-only.

@AlperCezibarakLeanix AlperCezibarakLeanix changed the title CID-5992: GitHub Actions hardening (pin semver-release-action, read-only gradle-build permissions) CID-5992: read-only default permissions for gradle-build workflow Dec 2, 2026
@AlperCezibarakLeanix
AlperCezibarakLeanix merged commit 7200741 into main Dec 2, 2026
3 checks passed
@AlperCezibarakLeanix
AlperCezibarakLeanix temporarily deployed to ghcr:leanix-github-agent December 2, 2026 13:17 — with GitHub Actions Inactive
@AlperCezibarakLeanix
AlperCezibarakLeanix deleted the feature/CID-5992/github-hardening-controls branch December 2, 2026 13:17

This branch was previously deployed

1 inactive deployment
ghcr:leanix-github-agent — e0ef7c01 Deployed Dec 2, 2026 by AlperCezibarakLeanix via build #113
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.

2 participants