agentleFS
TacunsTacuns/vibe-aegis/skills/production-preflight-gate/SKILL.md

production-preflight-gate

Skill1 starsChanged 15 days agoMITView on GitHub

The final go/no-go check before launch - live HTTP posture, exposed artifacts, container and CI hardening, privacy and account-deletion readiness, and the Release Readiness verdict. Use immediately before switching DNS, publishing a store release, or announcing a launch.

  • Reads credentials

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the artifact stage and resolve anything it finds:

    line 37
  2. Very specific:

    No secret baked into an image layer — ARG values persist in history even when later unset.

    line 48
  3. Distinctive:

    Key rotation: if a credential leaks tonight, what is the procedure?

    line 70
  4. Very specific:

    Write it to .aegis/AUDIT_REPORT.md with, for each section: what was checked, how, the result, and what was not covered.

    line 82
  5. Very specific:

    Never issue READY on the basis that nothing was found.

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Final Production Pre-Flight Gate

The last stage. Everything before this looked at code; this looks at the running deployment and the release process around it. Its job is to produce one decision — ship or do not ship — and to make that decision defensible.

When to Trigger

  • Immediately before switching DNS, promoting to production, or uploading a store release
  • Stage 9–10 of the master vibe-aegis loop
  • The user asks "am I ready to launch?", "final check", "can I go live?"

1. Live HTTP Posture

python3 .aegis/scripts/aegis_scan.py . --url https://your-production-url.com

These checks are strictly passive: read-only GET requests that read headers and detect accidentally public files. Only run them against a deployment you own.

HeaderWhy
Content-Security-PolicyThe main structural defence against XSS
Strict-Transport-SecurityStops downgrade to plain HTTP
X-Frame-Options / CSP frame-ancestorsStops clickjacking
X-Content-Type-Options: nosniffStops MIME-type confusion

Also confirm: CORS is scoped to your real origins and not * with credentials; session cookies carry HttpOnly, Secure and SameSite; and /.env, /.git/config and /.well-known/ return 403 or 404 rather than content.

A CSP in report-only mode is not enforcing. Check the header name.

2. Exposed Build Artifacts

Run the artifact stage and resolve anything it finds:

python3 .aegis/scripts/aegis_scan.py . --all --output .aegis/scan-report.json

Any ART-01 is a confirmed credential leak and is an automatic no-go until the key is rotated — see skills/artifact-leak-hunter/SKILL.md. Also confirm source maps are not publicly served if the source is proprietary, and that no .map, .env or backup file is reachable.

3. Container & Pipeline Hardening

  • Dockerfile runs as a non-root USER, uses a pinned base image digest, and multi-stage builds so compilers and secrets do not reach the final image.
  • No secret baked into an image layer — ARG values persist in history even when later unset.
  • CI workflows use least-privilege permissions: (contents: read unless more is genuinely needed).
  • No pull_request_target combined with checking out untrusted PR code — that combination hands repository secrets to anyone who opens a pull request.
  • Third-party actions pinned to a version or commit SHA, not a moving branch.
  • Dependencies installed from a lockfile (npm ci, not npm install).

4. Privacy & Legal Readiness

  • A privacy policy that matches what the app actually collects — verify against the real data inventory, not the intention.
  • A working account-deletion path. GDPR and both app stores require it, and store review rejects releases without it.
  • Cookie and analytics consent where required, with the tracker genuinely not loading before consent.
  • Data retention: logs and backups containing personal data have a defined lifetime.
  • Third-party processors listed, including the AI providers — user content sent to a model leaves your infrastructure, and that belongs in the policy.

5. Operational Readiness

The questions that matter at 3am:

  • Rollback: can you revert in minutes, and has that been tested? Database migrations are the usual trap — is the previous version compatible with the new schema?
  • Monitoring: will you learn about an outage from your tooling or from a user complaint?
  • Error tracking: wired up, and scrubbing PII before it is sent?
  • Backups: taken, and has a restore actually been performed? An untested backup is a hope.
  • Key rotation: if a credential leaks tonight, what is the procedure?

6. The Verdict

State one of three, with the evidence behind it:

VerdictCondition
READYScore ≥ 90/100, zero open CRITICAL/HIGH, all sections above verified
READY WITH KNOWN LIMITATIONSNo blockers, but specific items unverified or accepted — list each one explicitly
NOT READYAny open CRITICAL/HIGH, or any section that could not be verified at all

Write it to .aegis/AUDIT_REPORT.md with, for each section: what was checked, how, the result, and what was not covered. A gate that cannot say what it failed to check is not a gate.

Never issue READY on the basis that nothing was found. Absence of findings in an unrun check is not a pass — mark it NOT VERIFIED and say so plainly. And never describe a launch as "fully secure": state what was verified, when, and against which version.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.