Skip to main content
Version: 2.0.1

GitHub Action

Run JS Recon against any URL directly from a GitHub Actions workflow. Surface exposed endpoints, client-side vulnerabilities, and leaked source maps automatically on every push or pull request.


View on GitHub Marketplace →



Quick start​

- name: JS Recon
uses: js-recon/js-recon-action@v1
with:
url: https://your-target.com

Scanning a localhost app​

If the target runs on localhost, provide a command to start it. The action waits until the URL responds before scanning.

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: npm ci

- name: Build app
run: npm run build

- name: JS Recon
uses: js-recon/js-recon-action@v1
with:
url: http://localhost:3000
start-cmd: npm start
working-directory: .

Inputs​

InputRequiredDefaultDescription
urlYes—URL to scan (external or http://localhost:PORT)
start-cmdNo—Shell command to start the app for localhost scanning
working-directoryNo.Working directory for start-cmd
versionNolatestJS Recon version (latest, alpha, 1.3.1-beta.1, …)
break-on-map-filesNotrueFail if .map source map files are detected in the output
break-on-vulnerabilitiesNotrueFail if findings at or above the threshold are detected
vulnerability-severityNohighMinimum severity to fail on: low, medium, or high
confidential-pathsNo""Comma or newline-separated keywords to flag as confidential in OpenAPI path segments
break-on-confidential-pathsNotrueFail if confidential path keywords are detected in mapped-openapi.json
output-dirNojs-recon-outputDirectory to save output files

Outputs​

OutputDescription
map-files-foundtrue if .map files were detected, false otherwise
vulnerability-countNumber of findings at or above the configured severity
confidential-paths-foundNumber of OpenAPI paths matching a confidential-paths keyword
output-pathAbsolute path to the output directory

Output files​

JS Recon writes the following files inside the output directory:

FileDescription
analyze.jsonAll vulnerability findings
mapped.jsonParsed bundle structure
mapped-openapi.jsonExtracted HTTP endpoints (OpenAPI format)
endpoints.jsonClient-side routes
report.htmlFull HTML report
js-recon.dbSQLite database of all findings

Break conditions​

Source maps​

By default, the action fails if .map source map files are publicly accessible:

- uses: js-recon/js-recon-action@v1
with:
url: https://target.com
break-on-map-files: true # default

To disable: set break-on-map-files: false.

Vulnerabilities​

Control which severity level triggers a failure:

- uses: js-recon/js-recon-action@v1
with:
url: https://target.com
break-on-vulnerabilities: true
vulnerability-severity: medium # fail on medium or high

Available: low, medium, high (default: high).

Confidential paths​

Fail the action if any endpoint path in mapped-openapi.json contains a keyword you consider confidential (checked case-insensitively against each /-separated path segment):

- uses: js-recon/js-recon-action@v1
with:
url: https://target.com
confidential-paths: admin,administrator
break-on-confidential-paths: true # default

confidential-paths accepts a comma- or newline-separated list. To disable the check, leave confidential-paths empty (the default) or set break-on-confidential-paths: false.

Uploading output as an artifact​

- name: JS Recon
id: jsrecon
uses: js-recon/js-recon-action@v1
with:
url: https://target.com

- name: Upload output
if: always()
uses: actions/upload-artifact@v4
with:
name: js-recon-output
path: ${{ steps.jsrecon.outputs.output-path }}

Pinning to a specific JS Recon version​

- uses: js-recon/js-recon-action@v1
with:
url: https://target.com
version: 1.3.1

Use alpha to track the latest pre-release.