🎙️ task - feat(org): declare GitHub org security lockdown — actions policy, workflow token defaults, fork-PR policy, 2FA
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
Direzione di ricerca
Inizia leggendo i peer DeclaredGithubOrg* esistenti, l’uso di genDeclastructDao e la mappa dei tipi del provider, la factory e i punti di ingresso delle esportazioni dell’SDK. Implementa le quattro risorse a livello di organizzazione richieste con denominazione simmetrica, valori predefiniti sicuri, comportamento PUT idempotente e qualsiasi preflight 2FA indicato. Il lavoro è completo quando ognuna dispone della copertura di accettazione KEEP per l’inclusione nel piano e dopo l’applicazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🦫🎙️ dispatch to foreman
💧 task enqueued
├─ priority = ?
├─ yieldage = ?
└─ leverage = ?
title
feat(org): declare GitHub org security lockdown — actions policy, workflow token defaults, fork-PR policy, 2FA
description
.what
ehmpathy/declastruct-aws needs to declare an org-level GitHub lockdown policy, and
four of the required resources do not exist in this package yet. this task asks for the
domain objects + DAOs + acceptance that make the whole policy declarable.
audit run against the live ehmpathy org on 2026-08-02 (read-only, via gh api -X GET).
.why
ehmpathy/declastruct-aws is a PUBLIC repo that provisions live AWS accounts. its
ehmpathy-demo-oidc role carries demoPermissionsPolicy (ec2:*, iam:*Role, budgets:*,
ce:*) and its trust policy uses StringLike on repo:ehmpathy/*:* — so any repo, any
branch, any workflow in the org can assume it.
that AWS-side hole gets fixed in declastruct-aws. but the GitHub-side controls that bound the
same blast radius are ALSO wide open, and today they can only be clicked, not declared:
| live setting | value | why it matters |
|---|---|---|
default_repository_permission |
write |
every member holds write on every repo -> can push a branch anywhere -> can assume the AWS role |
two_factor_requirement_enabled |
false |
one phished member = org write = the AWS role |
default_workflow_permissions |
write |
GITHUB_TOKEN is read-write by default across the org |
can_approve_pull_request_reviews |
true |
a bot token can approve a PR (OWASP CICD-SEC-1) |
allowed_actions |
all |
any third-party action, from anywhere, in any workflow |
sha_pinning_required |
false |
tags are mutable pointers (OWASP CICD-SEC-3 / -4) |
a control that can only be clicked drifts silently and leaves no diff for a reviewer. these
belong in a declared wish like every other resource.
.what already exists here (verified, no work needed)
DeclaredGithubOrgMemberPrivilegesalready coversdefaultRepositoryPermission,
membersCanCreateRepositories,membersCanDeleteRepositories,
membersCanChangeRepoVisibility,membersCanForkPrivateRepositories,
membersCanInviteOutsideCollaboratorsDeclaredGithubBranchProtection,DeclaredGithubOrgRuleset,DeclaredGithubRepoRulesetDeclaredGithubOrgREADStwoFactorRequirementEnabled
.the gaps — 4 asks
1. DeclaredGithubOrgActionsPermissions
GET/PUT /orgs/{org}/actions/permissions
enabledRepositories:all | none | selectedallowedActions:all | local_only | selectedshaPinningRequired: boolean- and the companion
GET/PUT /orgs/{org}/actions/permissions/selected-actions
(githubOwnedAllowed,verifiedAllowed,patternsAllowed)
shaPinningRequired is the highest-value single field in this whole task — it enforces
rule.forbid.insecure.via=unpinned-third-party-code for every repo at once.
2. DeclaredGithubOrgActionsWorkflowDefaults
GET/PUT /orgs/{org}/actions/permissions/workflow
defaultWorkflowPermissions:read | writecanApprovePullRequestReviews: boolean
3. DeclaredGithubOrgActionsForkPrPolicy
GET/PUT /orgs/{org}/actions/permissions/fork-pr-workflows (and the repo-level peer)
- the approval-required policy for fork PRs, plus whether a fork PR may read secrets or hold
a write token
this is the one that lets outside contributors fork and contribute WITHOUT our resources,
which is exactly the posture we want — but it must be declared, not assumed.
4. twoFactorRequirementEnabled -> settable
it is readonly on DeclaredGithubOrg today. make it declarable, either by a move to
DeclaredGithubOrgMemberPrivileges or as its own resource. note it may need a plan-time
preflight: GitHub removes members who lack 2FA when it is turned on, so a set should
surface who would be dropped.
.acceptance
each of the four owes the full four, per
rule.require.dao-and-acceptance-per-declared-resource:
- a domain object with
uniquekeyed on the org - a DAO via
genDeclastructDao - provider registration (type map + factory) and sdk export
- acceptance coverage: plan-inclusion + post-apply
KEEP
plus:
- name them symmetric with the extant
DeclaredGithubOrg*peers
(rule.require.symmetry-with-peer-resources) - secure defaults where a default is shipped — a consumer who declares one of these
without thought should land in the pit of success, not on GitHub\x27s permissive default setmust be idempotent (these are all PUT-shaped, so upsert is natural)
.the desired end state, for reference
DeclaredGithubOrgActionsPermissions.as({
org, enabledRepositories: "all",
allowedActions: "selected", shaPinningRequired: true,
});
DeclaredGithubOrgActionsWorkflowDefaults.as({
org, defaultWorkflowPermissions: "read", canApprovePullRequestReviews: false,
});
.sources
- OWASP Top 10 CI/CD Security Risks
- catalog:
declastruct-aws/.agent/repo=.this/role=any/briefs/catalog.security.insecure-patterns.md
filed by beaver on behalf of vlad, out of the ehmpathy-camp grove behavior in
ehmpathy/declastruct-aws
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ehmpathy/declastruct-github
-
🎙️ task - fix(repo): coerce empty-string homepage/description to null (perpetual UPDATE drift)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
Tutte le issue di ehmpathy/declastruct-github
Issue simili
-
Bayern feature:Application ready web
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
digitalfabrik/entitlementcard#3176 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NanmiCoder/cc-haha#1533 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug: Calendar work items cannot be opened on mobileForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100