بنقرة واحدة
source-analysis
Frontend source code analysis for hidden routes, API endpoints, and secrets
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Frontend source code analysis for hidden routes, API endpoints, and secrets
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Business logic vulnerability detection — workflow bypass, price manipulation, state abuse, and application-specific flaws
Detect PII, credentials, and corporate sensitive data in API responses, source code, files, headers, and database extracts
Detect and exploit SQL injection vulnerabilities in web application parameters
Test for authentication and authorization flaws including credential attacks, session issues, and access control bypasses
Detect and exploit cross-site scripting vulnerabilities in web applications
Discover hidden parameters, test values, and identify input handling anomalies
| name | source-analysis |
| description | Frontend source code analysis for hidden routes, API endpoints, and secrets |
| origin | RedteamOpencode |
run_tool curl, grep/sed/awk, jq
When the task already provides a saved batch file or engagement workspace artifacts, prefer the local files over re-fetching remote content.
page batches, read the saved HTML/headers first, then only the specific JS/CSS files referenced by that page./#/..., #/..., or other fragment routes preserved from bundle analysis), plain HTTP refetch of the same URL is not enough because it only replays the root document. Materialize those cases with ./scripts/katana_route_capture.sh "$DIR" "<exact-case-url>" and inspect the saved route-capture artifact before marking the route exhausted. If the artifact only contains the exact-route seed error (for example hybrid: response is nil) or otherwise has zero successful response rows, treat that as failed materialization and requeue the route instead of closing it.dynamic_render/auth_entry follow-up and name the concrete UI/render action that still needs to be exercised (for example an exact ./scripts/browser_flow.py --url ... --output-dir ... [--cookies-from-auth "$DIR/auth.json"] step, plus a tiny --steps-file when a specific control/form is already evidenced). After route-capture has already proven the exact page exists and you have named that first concrete browser_flow.py step, the source-analysis page case itself is exhausted unless new source artifacts arrive that materially change the route evidence. Do not keep sending the same page case back through source-analysis just to wait for the first live route execution. That first bounded browser-flow pass belongs to exploit-developer or another live-route execution owner. If that exact route has already been materialized with route-capture and then covered once with bounded browser_flow.py, and the only remaining blocker is missing auth/credentials or a later exploit/surface step that is already preserved as a concrete surface record, do not keep requeueing the same source-analysis case just to wait. Mark the queue row exhausted and leave the unresolved work on the tracked dynamic_render / auth_entry / workflow surface instead; otherwise the dispatcher can starve on the same auth-gated route forever. If saved route-capture/browser-flow evidence already shows a successful write-capable workflow or submission (redirect, success snackbar/toast, confirmation dialog, created record, or another distinct post-submit state), that is still not terminal coverage: keep the exact route/workflow alive for exploit and name one bounded abuse replay on the same workflow (duplicate/second submission first, then one evidence-grounded empty/boundary/forged/unauthorized variant when it fits the visible controls or auth context). When the evidence gives you human-visible cues (button text, field labels, placeholders) but not stable selectors, say so explicitly and prefer text-based browser-flow steps such as click_text, type_by_label, type_by_placeholder, select_by_label, or submit_first_form in the follow-up you hand back. When a visible <select> / dropdown gate is the remaining blocker, keep the workflow alive with an explicit select or select_by_label step instead of treating the route as covered. If a bounded text-helper pass fails on a concrete modal/dialog/site-switch gate, inspect the saved DOM once for a stable selector/id/aria-label on the blocking control and hand back one selector-aware retry (wait_for_selector + click on that exact selector) before calling the route blocked or escalating to runtime_error.read entire large/minified bundles into context. Use targeted searches with strict caps (grep -n -m, sed -n, head, tail, jq) and keep only the matched lines you need.asset-manifest.json, chunk map, preload map, SSR config) lists JS/CSS asset paths, preserve the manifest path exactly as written unless the file itself proves a different absolute base. Do not prepend nearby version directories, CDN prefixes, or guessed parent paths just because adjacent config exposes a versionUrls map..js/.css/.json artifact contains XML/HTML object-storage errors such as NoSuchKey, AccessDenied, or SPA fallback markup, treat that as a retrieval-path problem rather than real source content. Reconstruct follow-up URLs from the manifest/root HTML exactly, prefer relative-path joins over guessed version prefixes, and clearly mark stale placeholder artifacts as exhausted.file utility in runtime containers; rely on headers, file extensions, wc -c, or tiny Python snippets if you need type/size hints.| Task | Agent |
|---|---|
| Fetch pages, fingerprint, fuzz dirs | recon-specialist |
| Analyze HTML/JS/CSS for hidden content | source-analyzer |
| Fuzz discovered params | fuzzer |
| Test endpoints for vulns | vulnerability-analyst |
List <script src>, <link stylesheet href>, inline <script> blocks, source map refs.
Extract: href/src/action values, hidden fields, data-url/data-api attributes,
HTML comments, meta tags (canonical, CSRF, API base), inline config (window.__CONFIG__).
run_tool curl -sL <js-url> | grep -oE '["'"'"'](/[a-zA-Z0-9_/\-\.]+)["'"'"']' | sort -u
For saved local bundles, prefer bounded pattern extraction over full reads, for example:
grep -n -m 80 -E 'fetch\(|axios\.|XMLHttpRequest|\.open\(|/rest/|/api/|/#/' downloads/main.js
fetch(), axios, XHR, $.ajax patternspath="/...", Vue { path: }, Angular { path: }api_key, token, secret, password assignments; AWS AKIA[A-Z0-9]{16}; JWT eyJ...window.__INITIAL_STATE__dynamic_render surface candidate (or auth_entry when it is clearly a login/register/auth screen) so surface coverage can materialize a bounded page visit later./#/score-board, /#/scoreboard, /score-board, or /scoreboard as merely informational. Preserve the exact route as a dynamic_render surface and requeue or hand off one bounded browser-flow visit before closing it. These routes often trigger solved-state evidence (for example Juice Shop Score Board) even when they expose no new API endpoint.Extract url() refs, @import paths, source map refs.
Probe: /swagger.json, /openapi.json, /api-docs, /graphql (introspection), /application.wadl
If an OpenAPI / Swagger spec is accessible, ingest it into the queue instead of leaving it as a passive note:
run_tool curl -sL "https://TARGET/openapi.json" -o $DIR/scans/openapi.json
./scripts/spec_ingest.sh "$ENGAGEMENT_DIR/cases.db" "$ENGAGEMENT_DIR/scans/openapi.json"
./scripts/dispatcher.sh "$ENGAGEMENT_DIR/cases.db" stats
This creates api-spec cases that should stay with source-analyzer long enough to resolve docs/spec carriers into concrete API cases for vulnerability-analyst.
Fetch .map only when there is an explicit source map reference or saved map artifact. Do not brute-force nonexistent maps.
When a map exists, extract just the sources array and the specific source files needed for the case at hand instead of dumping the whole map.