{"data":{"slug":"discovered-31dd7ed0727da5e7d931e16a9d8104da3657da7e0050b88b","title":"Security Maintenance","summary":"Find and safely ship one evidence-backed security improvement using an approved repository contract. Use when reviewing, hardening, or fixing a security issue in an unfamiliar codebase.","url":"https:\/\/skillshunter.net\/skills\/discovered-31dd7ed0727da5e7d931e16a9d8104da3657da7e0050b88b","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-31dd7ed0727da5e7d931e16a9d8104da3657da7e0050b88b","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-31dd7ed0727da5e7d931e16a9d8104da3657da7e0050b88b.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-31dd7ed0727da5e7d931e16a9d8104da3657da7e0050b88b\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before starting, explicitly ask the user if you may set up or refresh the repository's security contract. Identify the approved tooling, sensitive areas, and confirm whether the run should be audit-only, fix one finding, or include a pull request.","instructions":"---\nname: security-maintenance\ndescription: >\n  Find and safely ship one evidence-backed security improvement using an\n  approved repository contract. Use when reviewing, hardening, or fixing a\n  security issue in an unfamiliar codebase.\nargument-hint: \"[audit | fix-one | verify]\"\n---\n\n# Security Maintenance\n\nFind and address at most one security issue or security improvement per run.\nPrioritize demonstrable risk and a narrow, well-tested change over broad\nhardening or checklist-driven work.\n\n## Scope and Permissions\n\nRead-only repository inspection and proportionate local verification are\nimplicitly allowed. Do not add dependencies, change public contracts, alter\nauthentication or authorization semantics, perform a broad refactor, publish\nexternal findings, or open a pull request unless the user has authorized that\naction.\n\nDo not add or remove code comments unless the user explicitly asks. Express\nsecurity intent through clear code, tests, and review communication instead.\n\nReference workflows do not grant additional authority; apply them only within\nthese boundaries.\n\n## Repository Contract Setup\n\nBefore the first security scan in a repository, or whenever the existing\ncontract is absent or stale, explicitly ask the user:\n\n> Before I start, may I set up or refresh this repository's security contract?\n> I will inspect local instructions and configuration, identify the approved\n> tooling and sensitive areas, and show the contract for your approval. Should\n> this run be audit-only, fix one finding, or include a pull request?\n\nDo not start the scan until the user approves discovery. After approval, gather\nthe contract using only repository-local evidence:\n\n1. Read repository instructions, contribution guidance, and security policy.\n2. Identify supported commands from task runners, package manifests, build\n   files, CI workflows, and developer documentation.\n3. Find the language, framework, test stack, static-analysis tools, and\n   supported local runtime.\n4. Map high-value assets and boundaries: authentication, authorization,\n   tenancy or ownership, secrets, personal or regulated data, APIs, files,\n   jobs, webhooks, and external network access.\n5. Identify test, lint, build, security-scan, branch, commit, pull-request,\n   and disclosure conventions.\n\nPresent the proposed contract to the user and wait for approval before changing\nrepository files, recording durable memory, or creating a pull request. Use\nthe template in [repository-contract.md](references\/repository-contract.md).\n\nWhen the user approves it, preserve durable, non-sensitive repository-specific\nconstraints and learnings in the host agent's approved memory system when one\nexists and the user has authorized persistence. Memory is routing context, not\nlive evidence: revalidate commands, branches, policies, and security state in\neach run.\n\n## Investigation\n\nStart from evidence in the approved contract, a reported issue, a failing\nsecurity check, or a changed sensitive path. Prefer investigating the highest\nimpact reachable issue in this order:\n\n1. Unauthorized access, privilege escalation, tenant or ownership escape.\n2. Secret, token, personal-data, or regulated-data exposure.\n3. Injection, unsafe deserialization, SSRF, path traversal, unsafe redirects,\n   command execution, and unsafe file handling.\n4. Authentication, session, CSRF, rate-limit, and security-header failures.\n5. Dependency or configuration risk with a confirmed affected path.\n6. Small defense-in-depth improvement with a clear security outcome.\n\nDo not report a theoretical issue as exploitable without a supported path. Do\nnot turn an unchanged baseline finding into a pull-request regression.\n\n## Implementation\n\nFor an authorized fix, keep the change focused on the selected finding.\n\n1. Add or update a behavior-level test that demonstrates the failure before\n   the production change, where the repository supports this.\n2. Implement the smallest secure change.\n3. Verify authorization, ownership, input handling, error handling, and\n   sensitive-data behaviour appropriate to the affected path.\n4. Refactor only while the focused checks stay green.\n\nStop and ask the user before adding a dependency, making a breaking change,\nchanging an authentication or authorization contract, or expanding beyond one\nsmall finding. Never commit secrets, weaken controls to make tests pass, or\npublish exploit instructions or sensitive data.\n\n## Verification and Delivery\n\nRun the approved focused checks first, then the contract's required quality and\nsecurity gates before publishing. Report blocked or unavailable checks exactly\nas they occurred; never claim an unrun check passed.\n\nWhen a pull request is authorized:\n\n- Follow the repository's branch and commit convention. If no convention is\n  established, ask the user before creating the branch or commit.\n- Use Conventional Commits only when the contract requires them. Never add\n  decorative emojis or role branding to a title.\n- Explain the problem, why it matters, and the protection gained in plain\n  language. Keep public vulnerability detail proportionate to the repository's\n  visibility.\n- Push only after the approved quality gates pass, following the repository's\n  documented publication flow.\n\nIf no small, evidence-backed improvement is available, report that conclusion\nand stop without creating a pull request.\n","use_cases":["Reviewing a codebase for security vulnerabilities","Hardening a repository's security posture","Fixing a specific security issue in an unfamiliar codebase"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/damacus\/skills\/blob\/5706f70c0058822adf29da9bd7620c7ea780b9d6\/skills\/security\/security-maintenance\/SKILL.md","source_commit":"5706f70c0058822adf29da9bd7620c7ea780b9d6","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:54:45.000000Z","updated_at":"2026-12-02T09:15:01.000000Z","seo_title":"Security Maintenance Skill","seo_description":"Find and safely ship one evidence-backed security improvement using an approved repository contract. Use when reviewing, hardening, or fixing a security issue in an unfam","seo_keywords":["security maintenance","repository contract","security improvement","security review","codebase hardening"]}}