feat(org): declare the org security posture as code - #68
Merged
Conversation
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>
Merged
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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]