Harden IUCLabs org settings and actions #119
Reference in New Issue
Block a user
Delete Branch "benvin/github-iuclabs-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The IUCLabs org (free plan) leaves members able to create repos and Pages, and GITHUB_TOKEN defaults are unmanaged. Every org field is pinned so the full policy is declared in code.
config.yamlfor billing email, profile, repo creation, default repo permission (read or none) and public runnersgithub_orgitself, beside the team/repository submodulesconfig.yamlexistsremovedblocks...[0]of count resources; if config.yaml is removed (settings=null, count=0) the import blocks reference non-existent instances and plan errors → generate imports only when settings exist, or drop the imports after first apply.public_runners: trueopt-in default (false) in config as the why for public repos.members_can_create_internal_repositoriesis the one settable field not pinned, so the provider sends its own default for it → addmembers_can_create_internal_repositories = false, and add it to the pinned-false list in theorg_settings_pinnedtest.default_repository_permissionaccepts any string, sowrite/adminin config.yaml silently loosens the org → add avalidationblock limiting it toread/none(or drop the knob and pin"read"), plus aexpect_failurestest.prevent_destroyon thecountresources means deletingconfig.yamlmakes plan fail ("cannot be destroyed"), contradicting README "Without it, none of this is managed" → state in README that removal needs aremoved { lifecycle { destroy = false } }block, or drop the claim.default_repository_permission = "none"is accepted and planned asnone.No findings.