opencode-skills-collection 4.0.60 → 4.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,6 +9,7 @@
9
9
 
10
10
  [![npm version](https://img.shields.io/npm/v/opencode-skills-collection?style=for-the-badge&color=cb3837&label=npm)](https://www.npmjs.com/package/opencode-skills-collection)
11
11
  [![npm downloads](https://img.shields.io/npm/dm/opencode-skills-collection?style=for-the-badge&color=orange)](https://www.npmjs.com/package/opencode-skills-collection)
12
+ [![HOL Guard](https://img.shields.io/endpoint?url=https%3A%2F%2Fhol.org%2Fapi%2Fregistry%2Fbadges%2Fplugin%3Fslug%3Dfrancostino%252Fopencode-skills-collection%26metric%3Dtrust&style=for-the-badge)](https://hol.org/go/guard/rawsar?dest=%2Fguard%2Fbilling%3Fpromo%3DGUARD20-RAWSAR%23upgrade&link_id=02c248f9-50d5-4c60-abf0-ca80d2604a6b&utm_source=insights_share&utm_medium=affiliate_cta&utm_campaign=share20)
12
13
  [![license](https://img.shields.io/github/license/FrancoStino/opencode-skills-collection?style=for-the-badge&color=blue)](./LICENSE)
13
14
  [![zread](https://img.shields.io/badge/Documentation-_.svg?style=for-the-badge&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff)](https://zread.ai/FrancoStino/opencode-skills-collection)
14
15
  </div>
@@ -20,6 +21,11 @@
20
21
 
21
22
  ---
22
23
 
24
+ ## Sponsor
25
+ [![Sponsored by GitAds](https://gitads.dev/v1/ad-serve?source=francostino/opencode-skills-collection@github)](https://gitads.dev/v1/ad-track?source=francostino/opencode-skills-collection@github)
26
+
27
+ ---
28
+
23
29
  ## Overview
24
30
 
25
31
  **OpenCode Skills Collection** ships a pre-bundled snapshot of 1595+ universal skills for the OpenCode.
@@ -255,9 +261,6 @@ To use the latest beta version, update your `~/.config/opencode/opencode.json`:
255
261
 
256
262
  [MIT ©](./LICENSE)
257
263
 
258
- ## GitAds Sponsored
259
- [![Sponsored by GitAds](https://gitads.dev/v1/ad-serve?source=francostino/opencode-skills-collection@github)](https://gitads.dev/v1/ad-track?source=francostino/opencode-skills-collection@github)
260
-
261
264
  ## Star History
262
265
 
263
266
  <a href="https://www.star-history.com/?repos=FrancoStino%2Fopencode-skills-collection&type=date&legend=top-left">
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "updatedAt": "2026-09-12T01:53:52.661Z",
3
+ "updatedAt": "2026-09-14T02:04:32.368Z",
4
4
  "entries": [
5
5
  "00-andruia-consultant",
6
6
  "007",
@@ -64,6 +64,7 @@
64
64
  "agents-md",
65
65
  "agents-v2-py",
66
66
  "agenttrace-session-audit",
67
+ "agy-auto",
67
68
  "agy-delegate",
68
69
  "ai-agent-development",
69
70
  "ai-agents-architect",
@@ -451,6 +452,7 @@
451
452
  "clean-code-guard",
452
453
  "clerk-auth",
453
454
  "clickup-automation",
455
+ "client-secret-exposure-audit",
454
456
  "cline-delegate",
455
457
  "close-automation",
456
458
  "closed-loop-delivery",
@@ -952,6 +954,7 @@
952
954
  "gitlab-automation",
953
955
  "gitlab-ci-patterns",
954
956
  "gitops-workflow",
957
+ "glasser",
955
958
  "global-chat-agent-discovery",
956
959
  "gmail-automation",
957
960
  "go-concurrency-patterns",
@@ -1237,6 +1240,7 @@
1237
1240
  "marketing-ideas",
1238
1241
  "marketing-plan",
1239
1242
  "marketing-psychology",
1243
+ "marketplace-rbac-audit",
1240
1244
  "markstream-angular",
1241
1245
  "markstream-custom-components",
1242
1246
  "markstream-install",
@@ -1255,6 +1259,7 @@
1255
1259
  "mcp-builder",
1256
1260
  "mcp-builder-ms",
1257
1261
  "mcp-tool-developer",
1262
+ "md2video-audio",
1258
1263
  "mdpr-skill",
1259
1264
  "memory-forensics",
1260
1265
  "memory-safety-patterns",
@@ -1514,6 +1519,7 @@
1514
1519
  "product-marketing-context",
1515
1520
  "production-audit",
1516
1521
  "production-code-audit",
1522
+ "production-runtime-certification",
1517
1523
  "production-scheduling",
1518
1524
  "professional-proofreader",
1519
1525
  "programmatic-seo",
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: agy-auto
3
+ description: "Configure agy-auto PreToolUse security gate to run Antigravity CLI (agy) unattended with layered policy controls instead of --dangerously-skip-permissions."
4
+ category: security
5
+ risk: critical
6
+ source: community
7
+ source_repo: onkarbadve/agy-auto
8
+ source_type: community
9
+ date_added: "2026-09-11"
10
+ author: onkarbadve
11
+ tags: [antigravity, agy, security, permissions, sandboxing, guardrails, cli]
12
+ license: "MIT"
13
+ license_source: "https://github.com/onkarbadve/agy-auto/blob/main/LICENSE"
14
+ tools: [antigravity]
15
+ ---
16
+
17
+ # agy-auto — Antigravity Auto-Permission & Security Gate
18
+
19
+ ## Overview
20
+
21
+ `agy-auto` is a PreToolUse hook and security harness for Google Antigravity CLI (`agy`) that enables safe unattended execution without relying on `--dangerously-skip-permissions`. It passes every pending tool call through a multi-layered policy gate: deterministic hard-deny rules, deterministic fast-allow for workspace-scoped and read-only operations, an LLM classifier fallback (Gemini Flash Lite or local llama.cpp), and single-use scoped token approvals with Zero Ambient Authority.
22
+
23
+ ## When to Use This Skill
24
+
25
+ - Use when running Antigravity CLI (`agy`) unattended or in background agent loops and you want automated tool permissions without exposing system files or credentials.
26
+ - Use when you need granular, auditable controls over shell commands, file modifications, and network egress during `agy` workflows.
27
+ - Use when setting up a secure pair-programming environment with Antigravity that prevents prompt injection attacks from escaping the workspace.
28
+
29
+ ## How It Works
30
+
31
+ ### Step 1: Review, Pin, and Install agy-auto
32
+
33
+ > [!IMPORTANT]
34
+ > Because `agy-auto` installs as an active PreToolUse hook on the permission evaluation path, never clone a mutable branch directly into your live plugin directory. Always clone to a temporary staging folder, pin an immutable release tag or commit SHA, and inspect the codebase before making the hook executable.
35
+
36
+ **Option A: Native Antigravity Plugin (Recommended)**
37
+ ```bash
38
+ # 1. Clone into a temporary review directory and checkout an immutable release tag
39
+ git clone https://github.com/onkarbadve/agy-auto.git /tmp/agy-auto-review
40
+ cd /tmp/agy-auto-review
41
+ git checkout v0.2.0-alpha
42
+
43
+ # 2. Inspect hook.sh and engine/ files before deployment
44
+ less hook.sh
45
+ python3 -m unittest -v tests/test_engine.py
46
+
47
+ # 3. Once reviewed and verified, copy to the Antigravity plugin directory and set permissions
48
+ mkdir -p ~/.gemini/config/plugins/agy-auto
49
+ cp -r . ~/.gemini/config/plugins/agy-auto/
50
+ chmod +x ~/.gemini/config/plugins/agy-auto/hook.sh
51
+ ```
52
+
53
+ Ensure `toolPermission: "always-proceed"` is configured in `~/.gemini/antigravity-cli/settings.json` so hooks can gate tool calls:
54
+ ```json
55
+ {
56
+ "toolPermission": "always-proceed"
57
+ }
58
+ ```
59
+
60
+ **Option B: Global Hook via Installer**
61
+ ```bash
62
+ # 1. Clone to an isolated location and pin release
63
+ git clone https://github.com/onkarbadve/agy-auto.git ~/.local/share/agy-auto
64
+ cd ~/.local/share/agy-auto
65
+ git checkout v0.2.0-alpha
66
+
67
+ # 2. Review and run the installer
68
+ chmod +x hook.sh
69
+ ./install.sh # registers hook in hooks.json, sets always-proceed, runs smoke tests
70
+ ```
71
+
72
+ ### Step 2: Policy Evaluation Layers
73
+
74
+ `agy-auto` evaluates each tool invocation through sequential layers (first match wins):
75
+
76
+ 1. **Hard Deny**: Immediately blocks recursive deletes outside workspace, credential reads (`~/.ssh`, `.env`, cloud tokens), git history rewrites (`push --force`, `rebase`), package publishing, system file writes (`/etc`, shell rc), and gate tampering.
77
+ 2. **Fast Allow**: Immediately permits parsed read-only commands (`cat`, `grep`, `git status`) and workspace-confined writes without invoking an LLM.
78
+ 3. **Classifier**: Ambiguous or grey-area commands fall through to an LLM classifier (Google Gemini 3.5 Flash Lite free tier, or a local `llama.cpp` / Ollama endpoint) that reviews the pending call against conversation context and fail-closes on timeout.
79
+ 4. **Scoped Action Approval**: If a command is denied or needs human judgment, the engine issues a single-use 6-character action token bound strictly to `(tool, normalized_cmd, cwd)`. You approve it by replying `> agy-approve <token>` in chat. Conversational phrases like "yes" or "proceed" are ignored to prevent ambient authority leakage.
80
+
81
+ ## Examples
82
+
83
+ ### Example 1: Approving a Blocked Command
84
+
85
+ When an unclassified command is blocked, `agy-auto` outputs a token:
86
+ ```text
87
+ tool call denied by pre-tool hook: [agy-auto/classifier] needs human approval: pip install requests. Reply '> agy-approve a1b2c3' in chat to proceed.
88
+ ```
89
+ To authorize this specific command for a single run, reply directly in the chat:
90
+ ```text
91
+ > agy-approve a1b2c3
92
+ ```
93
+
94
+ ### Example 2: Configuring a Local Model Backend
95
+
96
+ To run `agy-auto` completely offline using llama.cpp or Ollama instead of cloud APIs, edit `~/.gemini/config/agy-auto/policy.toml`:
97
+ ```toml
98
+ [classifier]
99
+ endpoint = "http://127.0.0.1:8080/v1/chat/completions"
100
+ model = "qwen2.5-coder:7b"
101
+ timeout_s = 20
102
+ ```
103
+
104
+ ### Example 3: Running Headless Invocations
105
+
106
+ When invoking `agy` in headless mode (`-p`), always pass `--add-dir` so `agy-auto` recognizes the workspace boundaries:
107
+ ```bash
108
+ agy --add-dir . -p "Run test suite and fix failing cases"
109
+ ```
110
+
111
+ ## Best Practices
112
+
113
+ - ✅ Always keep `toolPermission: "always-proceed"` enabled so the pre-tool hook can intercept and gate every tool call.
114
+ - ✅ Add custom repetitive dev tools (e.g. specialized compilers, formatters) to `[fast_allow]` in `~/.gemini/config/agy-auto/policy.toml` for instant sub-millisecond execution.
115
+ - ✅ Pass `--add-dir <path>` when running headless commands (`agy -p`) to prevent false-positive path denials.
116
+ - ❌ Do not use `--dangerously-skip-permissions`; `agy-auto` provides safe autonomous execution without removing safety guardrails.
117
+ - ❌ Do not attempt conversational approval words ("approve", "proceed", "yes"); approvals strictly require the ephemeral action token.
118
+
119
+ ## Common Pitfalls
120
+
121
+ - **Problem:** Commands fail with `path is outside the workspace` when running `agy -p`.
122
+ **Solution:** Headless `agy` does not infer workspace roots automatically. Pass `--add-dir .` (e.g. `agy --add-dir . -p "..."`).
123
+ - **Problem:** Classifier fails closed with `policy classifier unavailable (The read operation timed out)`.
124
+ **Solution:** Increase `timeout_s` in `~/.gemini/config/agy-auto/policy.toml` (especially when running local LLMs on integrated graphics), or verify your `GEMINI_API_KEY`.
125
+ - **Problem:** Changes to `policy.toml` or `hook.sh` are blocked by `[agy-auto/hard_deny]`.
126
+ **Solution:** `agy-auto` enforces self-protection against agents tampering with the security gate. Edit policy files directly from your own shell.
127
+
128
+ ## Limitations
129
+
130
+ - `agy-auto` only intercepts actions performed via tool calls (e.g. `run_command`, `write_to_file`); it cannot restrict internal LLM network reasoning or Antigravity's own internal context-gathering file reads.
131
+ - Requires `toolPermission: "always-proceed"` in Antigravity settings to ensure the PreToolUse hook intercepts all tool invocations.
132
+ - Shell parsing is conservative: complex pipelines with computed variable expansions that cannot be statically resolved will fall through to the LLM classifier or require manual token approval.
133
+
134
+ ## Additional Resources
135
+
136
+ - [agy-auto GitHub Repository](https://github.com/onkarbadve/agy-auto)
137
+ - [Antigravity CLI Documentation](https://github.com/google-gemini/antigravity-cli)
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: client-secret-exposure-audit
3
+ description: "Audit a deployed web app for secrets exposed to the browser: hardcoded API keys/tokens in JS, secrets in HTML meta/attributes/comments, publicly reachable source/config/deploy files, and header/CORS misconfig."
4
+ category: security
5
+ risk: safe
6
+ source: self
7
+ source_type: self
8
+ date_added: "2026-09-10"
9
+ author: siddanta-ar1
10
+ tags: [security, secrets, owasp, reconnaissance, web, headers]
11
+ tools: [claude, cursor, gemini]
12
+ ---
13
+
14
+ # Client-Side Secret & Sensitive-File Exposure Audit
15
+
16
+ ## Overview
17
+
18
+ Modern web apps ship a lot of code and config to the browser. When credentials
19
+ leak into that client-visible surface — hardcoded in JavaScript, tucked into HTML
20
+ `meta`/`data-*` attributes or comments, or served as raw source/config/deploy
21
+ files that were never meant to be public — anyone can read them with `curl` and a
22
+ browser. This skill is a **defensive, read-only** workflow for finding that class
23
+ of exposure on a web app **you are authorized to assess**.
24
+
25
+ It maps to OWASP **A02:2021 Cryptographic Failures** (sensitive data exposure),
26
+ **A05:2021 Security Misconfiguration**, and CWE-798 (hardcoded credentials),
27
+ CWE-200 (sensitive information exposure), CWE-540 (source code in a production
28
+ build). It only fetches resources the server already hands to any anonymous
29
+ visitor — it does not exploit, brute-force, or mutate anything.
30
+
31
+ ## When to Use This Skill
32
+
33
+ - Use when you need to check whether a deployed site leaks API keys, tokens, or
34
+ passwords in its client-side bundle before shipping or during a review.
35
+ - Use when working with a static/SPA deployment (Vercel, Netlify, Nginx, S3,
36
+ GitHub Pages) and you want to confirm no source/config/deploy files are
37
+ publicly reachable.
38
+ - Use when the user asks to "find secrets," "audit exposed files," "check the
39
+ JS/HTML for credentials," or run a lightweight sensitive-data-exposure pass on
40
+ a URL they own or are authorized to test.
41
+ - Do **not** use this to attack third-party sites. See *Security & Safety Notes*.
42
+
43
+ ## How It Works
44
+
45
+ Set the target once. Every command below reads only what the server serves
46
+ publicly.
47
+
48
+ ```bash
49
+ BASE="https://TARGET.example" # authorized target, no trailing path
50
+ WORK="$(mktemp -d)"; cd "$WORK"
51
+ ```
52
+
53
+ ### Step 1: Fetch the page and inspect response headers
54
+
55
+ ```bash
56
+ curl -s -D headers.txt -o body.html "$BASE/"
57
+ cat headers.txt
58
+ ```
59
+
60
+ Flag on the headers:
61
+
62
+ - `access-control-allow-origin: *` — permissive CORS (worse when paired with
63
+ credentials).
64
+ - Missing `Content-Security-Policy`, `X-Frame-Options`/`frame-ancestors`,
65
+ `X-Content-Type-Options: nosniff`, `Referrer-Policy`, `Permissions-Policy`.
66
+ - Missing/weak `Strict-Transport-Security`.
67
+ - `Server`/framework version banners that fingerprint the stack.
68
+
69
+ ### Step 2: Grep the HTML for secrets and sinks
70
+
71
+ ```bash
72
+ grep -inE "secret|passwd|password|api[_-]?key|apikey|token|bearer|authorization|\
73
+ akia|sk_live|sk_test|pk_live|whsec_|ghp_|aiza|private[_-]?key|mongodb(\+srv)?://|\
74
+ data-[a-z-]*(secret|token|key|access)" body.html
75
+ grep -inE "<!--" body.html # read every HTML comment
76
+ grep -ioE '<meta[^>]+>' body.html # meta tags often carry keys/ids
77
+ grep -ioE '<script[^>]+src="[^"]+"' body.html # enumerate JS bundles
78
+ ```
79
+
80
+ Secrets hide in `data-*` attributes, `<meta>` tags, `hidden` `<div>`s, and
81
+ `<!-- comments -->` at least as often as in scripts.
82
+
83
+ ### Step 3: Pull every JavaScript bundle and scan it
84
+
85
+ ```bash
86
+ # extract script srcs, resolve relative paths against $BASE, fetch and scan
87
+ grep -ioE 'src="[^"]+\.js"' body.html | sed -E 's/^src="//; s/"$//' \
88
+ | while read -r p; do
89
+ u="$p"; case "$p" in http*) ;; /*) u="$BASE$p";; *) u="$BASE/$p";; esac
90
+ f="js_$(echo "$p" | tr '/:' '__')"
91
+ curl -s "$u" -o "$f" && echo "== $u =="
92
+ done
93
+ grep -rinE "secret|password|api[_-]?key|token|bearer|sk_(live|test)|pk_(live|test)|\
94
+ whsec_|akia|aiza|jwt|signing[_-]?key|admin[_-]?token|mongodb|redis://" js_* 2>/dev/null
95
+ ```
96
+
97
+ Also scan any sourcemaps (`*.js.map`) — they can rebuild original source with
98
+ comments intact.
99
+
100
+ ### Step 4: Probe for publicly reachable source / config / deploy files
101
+
102
+ SPAs often have a catch-all rewrite that returns `index.html` for unknown paths,
103
+ so **compare response sizes** — a path whose size differs from the SPA fallback
104
+ is a real, distinct file.
105
+
106
+ ```bash
107
+ FALLBACK=$(curl -s "$BASE/____nope____$RANDOM" | wc -c) # SPA fallback size
108
+ for p in /.env /.env.local /.env.production /.git/config /.git/HEAD \
109
+ /package.json /package-lock.json /vercel.json /.vercel/project.json \
110
+ /Dockerfile /docker-compose.yml /wrangler.toml /.gitignore \
111
+ /server/index.js /src/config/app.config.js /config.js \
112
+ /src/services/payment.service.js /webpack.config.js /next.config.js; do
113
+ read -r code size < <(curl -s -o /dev/null -w "%{http_code} %{size_download}" "$BASE$p")
114
+ [ "$code" = "200" ] && [ "$size" != "$FALLBACK" ] && echo "REAL FILE $code $size $p"
115
+ done
116
+ ```
117
+
118
+ For any real file found, fetch it and re-run the Step 2/3 secret grep. Follow
119
+ `require(...)`/`import` paths inside those files to discover more source files
120
+ (routes, controllers, services, webhooks) and repeat.
121
+
122
+ ### Step 5: Triage and score
123
+
124
+ Rate each finding by blast radius, not by where it was found:
125
+
126
+ | Severity | Examples |
127
+ |---|---|
128
+ | **Critical** | Live provider secret keys (`sk_live_`, cloud `AKIA…`+secret, DB URI with password, private signing/JWT secret, admin bearer token) reachable anonymously |
129
+ | **High** | Server-side source/config/deploy files exposed; test-mode secret keys; internal service tokens; webhook signing secrets |
130
+ | **Medium** | CORS `*`, missing CSP/security headers, verbose banners, weak randomness for security values (`Math.random()` for tokens/refs) |
131
+ | **Low / Info** | Public keys correctly client-side, analytics IDs, non-secret config, stack fingerprinting |
132
+
133
+ A key being "test/demo" does not make it safe if the *pattern* would ship a live
134
+ key the same way — report the pattern.
135
+
136
+ ### Step 6: Report
137
+
138
+ Write findings as Markdown using the format in
139
+ [references/example-report.md](references/example-report.md): one row/section per finding with
140
+ `Severity · Category (OWASP/CWE) · Location · Evidence (redacted) · Impact ·
141
+ Remediation`. Redact real secret material to a prefix + length. End with
142
+ prioritized remediation and a note on which secrets must be **rotated**, not just
143
+ removed (anything committed/served is already compromised).
144
+
145
+ ## Examples
146
+
147
+ ### Example 1: Secrets in HTML meta and hidden elements
148
+
149
+ ```bash
150
+ BASE="https://demo-for-opensource.vercel.app"; curl -s "$BASE/" -o body.html
151
+ grep -inE "recaptcha-secret|data-aws-secret|data-webhook-secret|mongodb\+srv" body.html
152
+ # -> meta recaptcha-secret=..., data-aws-access=AKIA…/data-aws-secret=…,
153
+ # data-webhook-secret=whsec_…, and a hidden JSON blob with a mongodb+srv URI
154
+ # (username:password@cluster). All reachable with a single unauthenticated GET.
155
+ ```
156
+
157
+ ### Example 2: Hardcoded credentials in a JS config bundle
158
+
159
+ ```bash
160
+ curl -s "$BASE/public/assets/js/config.js" | \
161
+ grep -inE "API_SECRET|ADMIN_TOKEN|JWT_SECRET|DATABASE_PASSWORD|PAYMENT_SIGNING_KEY"
162
+ # -> API_SECRET, ADMIN_TOKEN (JWT), JWT_SECRET, DATABASE_PASSWORD, and a payment
163
+ # signing key, all assigned as plain string constants shipped to every browser.
164
+ ```
165
+
166
+ ### Example 3: Server source exposed behind a SPA fallback
167
+
168
+ ```bash
169
+ FALLBACK=$(curl -s "$BASE/__nope__" | wc -c)
170
+ for p in /server/index.js /docker-compose.yml /src/services/payment.service.js; do
171
+ sz=$(curl -s "$BASE$p" | wc -c); [ "$sz" != "$FALLBACK" ] && echo "REAL $sz $p"
172
+ done
173
+ # -> docker-compose.yml leaks a Redis password; payment.service.js leaks
174
+ # Stripe/Khalti secret keys + webhook secret. Distinct sizes prove they are
175
+ # real files, not the SPA catch-all page.
176
+ ```
177
+
178
+ A full worked report for this target is in [references/example-report.md](references/example-report.md).
179
+
180
+ ## Best Practices
181
+
182
+ - ✅ Confirm written authorization and scope (the exact hostnames) before fetching.
183
+ - ✅ Compare every probed path against the SPA fallback size to avoid false 200s.
184
+ - ✅ Follow `require`/`import` chains in any exposed source file to find more files.
185
+ - ✅ Redact real secret values in the report; record enough to identify, not reuse.
186
+ - ✅ Flag secrets for **rotation** — served/committed secrets are already burned.
187
+ - ❌ Don't use discovered credentials to authenticate, pivot, or access data.
188
+ - ❌ Don't run this against sites you don't own or aren't authorized to test.
189
+ - ❌ Don't treat "it's a test/demo key" as safe — report the shipping pattern.
190
+
191
+ ## Limitations
192
+
193
+ - Read-only reconnaissance of client-served assets; it does not test injection,
194
+ auth logic, IDOR, or server-side flaws — pair with `@web-security-testing`.
195
+ - Path probing uses a wordlist; it finds common exposures, not every file.
196
+ - This skill does not replace environment-specific validation, testing, or expert
197
+ review.
198
+ - Stop and ask for clarification if authorization, scope, or safety boundaries
199
+ are missing.
200
+
201
+ ## Security & Safety Notes
202
+
203
+ - **Authorized targets only.** Run exclusively against systems you own or have
204
+ explicit written permission to assess. Unauthorized scanning may be illegal.
205
+ - Every command here performs only unauthenticated `GET` requests for resources
206
+ the server already serves publicly — no exploitation, brute force, or mutation.
207
+ - Handle any real secrets you uncover as sensitive: store findings in an access-
208
+ controlled location, redact them in shared reports, and recommend rotation.
209
+ - Do not exfiltrate data or reuse discovered credentials — locating an exposure is
210
+ the deliverable; using it is out of scope.
211
+
212
+ ## Common Pitfalls
213
+
214
+ - **Problem:** Every probed path returns HTTP 200, hiding real files.
215
+ **Solution:** SPA catch-all rewrite. Baseline the fallback body size and only
216
+ treat paths with a *different* size as real files.
217
+ - **Problem:** Grep misses secrets stored in `data-*` attributes or comments.
218
+ **Solution:** Also scan `<meta>`, `data-*`, `hidden` elements, and every
219
+ `<!-- comment -->`, not just `<script>` bodies.
220
+ - **Problem:** Dismissing a finding because the key is labeled "test/demo."
221
+ **Solution:** Report the pattern — the same code path would ship a live key.
222
+
223
+ ## Related Skills
224
+
225
+ - `@web-security-testing` — broader OWASP Top 10 workflow; use for injection,
226
+ auth, and access-control testing this skill does not cover.
227
+ - `@dependency-management-deps-audit` — pairs well for supply-chain/component risk
228
+ once client exposure is triaged.
@@ -0,0 +1,144 @@
1
+ # Example Audit Report — Client-Side Secret & Sensitive-File Exposure
2
+
3
+ **Target:** `https://demo-for-opensource.vercel.app/` (a public, intentionally
4
+ vulnerable demonstration app — "Himalayan Vista Hotel")
5
+ **Date:** 2026-09-10
6
+ **Method:** Unauthenticated `GET` requests only (see `SKILL.md`)
7
+ **Scope note:** This is a public demo whose own source states *"All secrets are
8
+ fake demonstration values."* It is used here purely to illustrate the report
9
+ format the skill produces. Values below are redacted to prefix + length.
10
+
11
+ ## Summary
12
+
13
+ The site is a static/SPA deployment that ships a large amount of server-side
14
+ source, config, and deployment material to the browser, with credentials
15
+ scattered across **every layer** — HTML meta tags, hidden DOM elements, HTML
16
+ comments, JavaScript bundles, and publicly reachable `server/`, `src/`, and
17
+ container files. Additionally, response headers omit the standard security header
18
+ set and use permissive CORS.
19
+
20
+ | # | Severity | Finding | OWASP / CWE |
21
+ |---|----------|---------|-------------|
22
+ | 1 | Critical | Admin bearer token, JWT secret, DB password & DB URI shipped to the browser | A02 / CWE-798, CWE-522 |
23
+ | 2 | Critical | Cloud + payment provider secrets exposed (AWS, Stripe/Khalti secret keys, webhook signing secret) | A02 / CWE-798, CWE-200 |
24
+ | 3 | High | Server-side source, config & deploy files publicly reachable | A05 / CWE-540, CWE-527 |
25
+ | 4 | High | reCAPTCHA **secret** key placed in an HTML `<meta>` tag | A02 / CWE-798 |
26
+ | 5 | Medium | Missing security headers (CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) | A05 / CWE-693 |
27
+ | 6 | Medium | Permissive CORS (`Access-Control-Allow-Origin: *`) | A05 / CWE-942 |
28
+ | 7 | Medium | Insecure randomness for booking references (`Math.random()`) | A02 / CWE-338 |
29
+ | 8 | Low/Info | Third-party tokens & analytics IDs in client JS; verbose `console.log` of keys | A09 / CWE-532 |
30
+
31
+ ---
32
+
33
+ ## Findings
34
+
35
+ ### 1 — Critical: Admin token, JWT secret, DB password shipped to the browser
36
+
37
+ - **Location:** `public/assets/js/config.js` (loaded on every page); mirrored in
38
+ `src/config/app.config.js`.
39
+ - **Evidence (redacted):** `ADMIN_TOKEN = "eyJhbGciOiJ…" (JWT, role=operations)`,
40
+ `JWT_SECRET = "eyJhbGciOiJ…"`, `API_SECRET = "hvh_live_s3c37_…" (28 chars)`,
41
+ `DATABASE_PASSWORD = "Vista#…!" (16 chars)`, plus a hidden `<div>` JSON blob
42
+ containing `mongodb+srv://hvh-backend:****@cluster0.…/hvh_prod`.
43
+ - **Impact:** Anyone can read an admin bearer token, the JWT signing secret
44
+ (allowing forged tokens for any role), the API secret, and DB credentials — full
45
+ data-tier compromise if these were live.
46
+ - **Remediation:** Never place secrets in client bundles. Keep secrets server-side
47
+ in a secrets manager / env vars; expose only publishable keys to the browser.
48
+ **Rotate every value** — anything served is already compromised.
49
+
50
+ ### 2 — Critical: Cloud & payment provider secrets exposed
51
+
52
+ - **Location:** HTML hidden `<div data-aws-access / data-aws-secret>` and
53
+ `data-webhook-secret`; `src/services/payment.service.js`; `docker-compose.yml`.
54
+ - **Evidence (redacted):** `AKIA…EXAMPLE` + AWS secret; Stripe `sk_test_51Qf4…`;
55
+ Khalti `live_secret_key_…`; `whsec_a9f4…`; Redis `redis://…:7fK9…@cache:6379`.
56
+ - **Impact:** Server-side payment secret keys and a webhook signing secret in the
57
+ client allow forging payment intents and spoofing signed webhook events; the
58
+ Redis password enables cache/session tampering — if live.
59
+ - **Remediation:** Move all provider secret keys server-side; only `pk_*`
60
+ publishable keys belong in the browser. Rotate all exposed keys and secrets.
61
+
62
+ ### 3 — High: Server-side source, config & deploy files publicly reachable
63
+
64
+ - **Location (confirmed real via size ≠ SPA fallback):** `/server/index.js`,
65
+ `/server/routes/{booking,payment,review,webhook}.routes.js`,
66
+ `/src/config/app.config.js`, `/src/services/{payment,booking}.service.js`,
67
+ `/docker-compose.yml`, `/Dockerfile`, `/public/assets/js/config.js`.
68
+ - **Evidence:** Each returns a distinct body size from the SPA catch-all page and
69
+ contains real source/config (route definitions, internal service tokens such as
70
+ `hvh_svc_…`, container build details).
71
+ - **Impact:** Exposes internal architecture, endpoints, auth/rate-limit middleware
72
+ names, and embedded credentials — a blueprint for further attack.
73
+ - **Remediation:** Deploy only build output (`public/` + `index.html`). Exclude
74
+ `server/`, `src/`, and deploy files from the published artifact (`.vercelignore`
75
+ / correct build root). Serve 404 for non-asset paths instead of leaking files.
76
+
77
+ ### 4 — High: reCAPTCHA secret key in an HTML meta tag
78
+
79
+ - **Location:** `<meta name="recaptcha-secret" content="6LcVo3kq…">` in `index.html`.
80
+ - **Evidence:** The **secret** (server-verification) key is in page markup
81
+ alongside the site key.
82
+ - **Impact:** The reCAPTCHA secret is server-only; exposing it lets attackers
83
+ script verification and undermines bot protection.
84
+ - **Remediation:** Remove the secret from all client output; keep only the site
85
+ key client-side. Regenerate the reCAPTCHA keypair.
86
+
87
+ ### 5 — Medium: Missing security headers
88
+
89
+ - **Location:** Main response headers for `/`.
90
+ - **Evidence:** No `Content-Security-Policy`, `X-Frame-Options`/`frame-ancestors`,
91
+ `X-Content-Type-Options: nosniff`, `Referrer-Policy`, or `Permissions-Policy`.
92
+ (`Strict-Transport-Security` **is** present — good.)
93
+ - **Impact:** Increased XSS, clickjacking, MIME-sniffing, and referrer-leak risk.
94
+ - **Remediation:** Add a strict CSP, `X-Content-Type-Options: nosniff`,
95
+ `X-Frame-Options: DENY` (or CSP `frame-ancestors 'none'`), `Referrer-Policy:
96
+ strict-origin-when-cross-origin`, and a least-privilege `Permissions-Policy`
97
+ (e.g. via `vercel.json` headers).
98
+
99
+ ### 6 — Medium: Permissive CORS
100
+
101
+ - **Location:** Response header `Access-Control-Allow-Origin: *`.
102
+ - **Impact:** Any origin can read responses; dangerous if any endpoint returns
103
+ user/authenticated data.
104
+ - **Remediation:** Restrict `Access-Control-Allow-Origin` to trusted origins;
105
+ never combine `*` with credentialed requests.
106
+
107
+ ### 7 — Medium: Insecure randomness for booking references
108
+
109
+ - **Location:** `src/services/booking.service.js` — `randomRef()` uses
110
+ `Math.random()`; `fetchAvailabilityHold` builds predictable `HOLD-<room>-<date>`
111
+ ids.
112
+ - **Impact:** Predictable/guessable references enable enumeration of bookings/holds.
113
+ - **Remediation:** Use a CSPRNG (`crypto.randomUUID()` / `crypto.randomBytes`) for
114
+ any security-relevant identifier.
115
+
116
+ ### 8 — Low/Info: Third-party tokens & noisy logging
117
+
118
+ - **Location:** `main.js` (Mixpanel/Hotjar/OpenWeather/Freshdesk/Zendesk tokens,
119
+ `console.log` of keys); `api/client.js` (`console.log` note, static
120
+ `X-Rate-Limit-Bypass` header value).
121
+ - **Impact:** Some of these (weather/analytics) are lower-risk, but support-desk
122
+ tokens and a rate-limit-bypass header value are sensitive; logging keys to the
123
+ console aids attackers.
124
+ - **Remediation:** Remove secret logging; move non-public tokens server-side;
125
+ never ship a "rate-limit-bypass" value to the client.
126
+
127
+ ---
128
+
129
+ ## Prioritized Remediation
130
+
131
+ 1. **Rotate immediately** (were they live): admin/JWT/API secrets, DB password &
132
+ URI, AWS keys, Stripe/Khalti secret keys, webhook & payment signing secrets,
133
+ Redis password, reCAPTCHA secret, internal service tokens.
134
+ 2. **Stop shipping server code:** publish only `public/` + `index.html`; exclude
135
+ `server/`, `src/`, and deploy files from the deployment artifact.
136
+ 3. **Remove all secrets from client output** (JS, HTML meta/`data-*`/comments);
137
+ keep only publishable keys in the browser.
138
+ 4. **Add the security-header set** and tighten CORS via `vercel.json`.
139
+ 5. **Replace `Math.random()`** with a CSPRNG for any security-relevant value.
140
+ 6. **Remove secret `console.log`** statements and client-side bypass headers.
141
+
142
+ > Reminder: this target is a public teaching demo with intentionally fake
143
+ > secrets. The same findings on a real deployment would be treated as an incident,
144
+ > starting with credential rotation.