Skip to content

feat(org): declare the org security posture as code - #68

Merged
uladkasach merged 2 commits into
mainfrom
beav/feat-org-security-lockdown
Aug 6, 2026
Merged

feat(org): declare the org security posture as code#68
uladkasach merged 2 commits into
mainfrom
beav/feat-org-security-lockdown

Conversation

@ehm-seaturtle

Copy link
Copy Markdown
Contributor

feat(org): declare the org security posture as code

five new declastruct resources make the ehmpathy org security posture
declarable, reviewable as a diff, and drift-detecting — replacing controls
that could previously only be clicked in the web UI.

  • DeclaredGithubOrgActionsPermissions (carries shaPinningRequired)
  • DeclaredGithubOrgActionsWorkflowDefaults
  • DeclaredGithubOrgAuthenticationTwoFactorRequirement (guidance flow)
  • DeclaredGithubOrgActionsForkPrApproval
  • DeclaredGithubOrgActionsForkPrPrivateRepoPolicy

each carries a domain object, dao, provider registration, sdk export, and
acceptance coverage that proves plan-inclusion.

2FA has no API write path, so its set() escorts a human with direct URLs
and names who github would remove BEFORE it happens, rather than pretend
to converge. verified live: it named three members, who then enrolled, so
enabling it removed nobody.

daos are now exported from the sdk (previously zero were), per the wisher.

applied to the live ehmpathy org: shaPinningRequired false to true,
defaultWorkflowPermissions write to read, canApprovePullRequestReviews
true to false, 2FA off to on, forkPrApproval to all_external_contributors
so only members run without approval. this settles the open question of
whether sha_pinning_required is gated behind a paid plan — it is not.


🐢🌊 surfed in by seaturtle[bot]

ehm-seaturtle and others added 2 commits August 6, 2026 07:41
five new declastruct resources make the ehmpathy org security posture
declarable, reviewable as a diff, and drift-detecting — replacing controls
that could previously only be clicked in the web UI.

- DeclaredGithubOrgActionsPermissions (carries shaPinningRequired)
- DeclaredGithubOrgActionsWorkflowDefaults
- DeclaredGithubOrgAuthenticationTwoFactorRequirement (guidance flow)
- DeclaredGithubOrgActionsForkPrApproval
- DeclaredGithubOrgActionsForkPrPrivateRepoPolicy

each carries a domain object, dao, provider registration, sdk export, and
acceptance coverage that proves plan-inclusion.

2FA has no API write path, so its set() escorts a human with direct URLs
and names who github would remove BEFORE it happens, rather than pretend
to converge. verified live: it named three members, who then enrolled, so
enabling it removed nobody.

daos are now exported from the sdk (previously zero were), per the wisher.

applied to the live ehmpathy org: shaPinningRequired false to true,
defaultWorkflowPermissions write to read, canApprovePullRequestReviews
true to false, 2FA off to on, forkPrApproval to all_external_contributors
so only members run without approval. this settles the open question of
whether sha_pinning_required is gated behind a paid plan — it is not.

Co-authored-by: ulad kasach <uladkasach@gmail.com>
- the org now declares `shaPinningRequired: true`, and github enforces it at
  action-resolution time: the run hard-fails before any step executes, with
  "The action actions/checkout@v4 is not allowed in ehmpathy/declastruct-github
  because all actions must be pinned to a full-length commit SHA."

- so this repo could not build against its own posture. 48 external `uses:`
  refs across 6 workflow files are now pinned, each with a trailing `# vN`
  comment so a human can still read which release the sha belongs to.

- a tag is a mutable pointer: whoever can move `v4` can run arbitrary code in
  every workflow that trusts it (OWASP CICD-SEC-3 / -4). a sha cannot be moved.

- local `./.github/...` refs are untouched — they resolve from this repo tree,
  so there is no third-party pointer to pin.

Co-authored-by: ulad kasach <uladkasach@gmail.com>
@uladkasach
uladkasach merged commit 7204438 into main Aug 6, 2026
20 checks passed
@uladkasach
uladkasach deleted the beav/feat-org-security-lockdown branch August 6, 2026 12:54
@rhelease rhelease Bot mentioned this pull request Aug 6, 2026
@rhelease

rhelease Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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.

2 participants