feat(cycle): security-feature enforcement cycle (#13)#27
Merged
Conversation
Reconciles repo security features: advanced security / secret scanning / push protection via security_and_analysis PATCH, plus Dependabot vulnerability-alerts and automated-security-fixes via their dedicated endpoints. New RepoSecurityConfig + LiveRepoSecurity + repo-security diff type. License-gated writes surface as reported failed entries, not crashes. Registered, exported, action bundle rebuilt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes #13. First of the post-publish backlog cycles.
Adds the security-features cycle — enforces repo security posture.
What it does
security_and_analysis(PATCH /repos/{o}/{r}): advanced security, secret scanning, secret-scanning push protection.vulnerability-alertsendpoint, 204/404 semantics).automated-security-fixesendpoint).New types
RepoSecurityConfigonRepoConfig.security.LiveRepoSecurity+diffRepoSecurity→ newrepo-securityresource type (object diff, like org-settings but per-repo), added toRESOURCE_TYPE_ORDER.License-gated graceful degradation
GHAS features require a license. When unavailable GitHub rejects the enabling PATCH — that surfaces as a reported failed entry in the cycle result (the runner continues past it), not a crash. A test asserts a 422 "Advanced Security is not available" lands in
cr.failedwhile the run still completes.Verification
npx tsc --noEmitcleannpm testgreen (343 tests; +15 insecurity-features.test.ts)🤖 Generated with Claude Code