@shriyanss/js-recon 1.4.1-alpha.5 → 1.4.1-alpha.6

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.
@@ -0,0 +1,116 @@
1
+ # Manually-triggered second phase of a release, run after a staged npm publish
2
+ # (see publish-js-recon.yml) has been approved by a human with 2FA on npmjs.com.
3
+ # Installs js-recon from the published npm registry artifact rather than
4
+ # building from git source, so the Homebrew/Docker/GHCR outputs are provably
5
+ # the same bits that were reviewed and approved on npm.
6
+
7
+ name: Promote JS Recon Release
8
+
9
+ on:
10
+ workflow_dispatch:
11
+ inputs:
12
+ version:
13
+ description: "Published npm version to promote (e.g. 1.4.1-alpha.6, no leading v)"
14
+ required: true
15
+ type: string
16
+
17
+ jobs:
18
+ update-homebrew-tap:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Fetch published tarball and compute SHA256
22
+ id: sha256
23
+ run: |
24
+ npm pack "@shriyanss/js-recon@${VERSION}"
25
+ SHA=$(sha256sum "shriyanss-js-recon-${VERSION}.tgz" | awk '{print $1}')
26
+ echo "sha256=${SHA}" >> "$GITHUB_OUTPUT"
27
+ env:
28
+ VERSION: ${{ inputs.version }}
29
+
30
+ - name: Check out homebrew-tap
31
+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
32
+ with:
33
+ repository: shriyanss/homebrew-tap
34
+ token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
35
+ path: homebrew-tap
36
+
37
+ - name: Update formula fields
38
+ working-directory: homebrew-tap
39
+ run: |
40
+ F="Formula/js-recon.rb"
41
+ sed -i "s|^ url \"https://registry\.npmjs\.org/@shriyanss/js-recon/-/js-recon-[^\"]*\"| url \"https://registry.npmjs.org/@shriyanss/js-recon/-/js-recon-${VERSION}.tgz\"|" "${F}"
42
+ sed -i "s|^ sha256 \"[a-f0-9]*\"| sha256 \"${SHA}\"|" "${F}"
43
+ env:
44
+ VERSION: ${{ inputs.version }}
45
+ SHA: ${{ steps.sha256.outputs.sha256 }}
46
+
47
+ - name: Commit and push
48
+ working-directory: homebrew-tap
49
+ run: |
50
+ git config user.name "github-actions[bot]"
51
+ git config user.email "github-actions[bot]@users.noreply.github.com"
52
+ git add Formula/js-recon.rb
53
+ git commit -m "chore: update js-recon formula to ${VERSION}"
54
+ git push
55
+ env:
56
+ VERSION: ${{ inputs.version }}
57
+
58
+ publish-docker:
59
+ runs-on: ubuntu-latest
60
+ steps:
61
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
62
+ - name: Build and push to dockerhub
63
+ run: |
64
+ # login to docker
65
+ echo $DOCKER_SECRET | docker login -u shriyanss --password-stdin
66
+
67
+ # build the image from the published npm artifact
68
+ docker build -f Dockerfile.release --build-arg JS_RECON_VERSION=$VERSION -t shriyanss/js-recon:$VERSION .
69
+
70
+ # check if it is alpha or beta. default to latest
71
+ TAG="latest"
72
+ [[ "$VERSION" == *"beta"* ]] && TAG="beta"
73
+ [[ "$VERSION" == *"alpha"* ]] && TAG="alpha"
74
+
75
+ # tag again with whatever has been set
76
+ docker tag shriyanss/js-recon:$VERSION shriyanss/js-recon:$TAG
77
+
78
+ # push images with both tags
79
+ docker push shriyanss/js-recon:$VERSION
80
+ docker push shriyanss/js-recon:$TAG
81
+
82
+ env:
83
+ DOCKER_SECRET: ${{ secrets.DOCKER_SECRET }}
84
+ VERSION: ${{ inputs.version }}
85
+
86
+ publish-ghcr:
87
+ runs-on: ubuntu-latest
88
+ permissions:
89
+ contents: read
90
+ packages: write
91
+ steps:
92
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
93
+ - uses: docker/login-action@v3
94
+ with:
95
+ registry: ghcr.io
96
+ username: ${{ github.actor }}
97
+ password: ${{ secrets.GITHUB_TOKEN }}
98
+ - name: Build and push to github container registry
99
+ run: |
100
+ # build the image from the published npm artifact
101
+ docker build -f Dockerfile.release --build-arg JS_RECON_VERSION=$VERSION -t ghcr.io/shriyanss/js-recon:$VERSION .
102
+
103
+ # check if it is alpha or beta. default to latest
104
+ TAG="latest"
105
+ [[ "$VERSION" == *"beta"* ]] && TAG="beta"
106
+ [[ "$VERSION" == *"alpha"* ]] && TAG="alpha"
107
+
108
+ # tag again with whatever has been set
109
+ docker tag ghcr.io/shriyanss/js-recon:$VERSION ghcr.io/shriyanss/js-recon:$TAG
110
+
111
+ # push images with both tags
112
+ docker push ghcr.io/shriyanss/js-recon:$VERSION
113
+ docker push ghcr.io/shriyanss/js-recon:$TAG
114
+
115
+ env:
116
+ VERSION: ${{ inputs.version }}
@@ -63,6 +63,9 @@ jobs:
63
63
  publish-npm:
64
64
  needs: build
65
65
  runs-on: ubuntu-latest
66
+ permissions:
67
+ id-token: write
68
+ contents: read
66
69
  steps:
67
70
  - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
68
71
  - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
@@ -71,129 +74,20 @@ jobs:
71
74
  registry-url: https://registry.npmjs.org/
72
75
  - run: npm ci
73
76
  - run: npm run build
74
- - name: Publish to npm
75
- run: |
76
- TAG="latest"
77
- [[ "$VERSION" == *"beta"* ]] && TAG="beta"
78
- [[ "$VERSION" == *"alpha"* ]] && TAG="alpha"
79
- npm publish --tag $TAG
80
- env:
81
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
82
- VERSION: ${{ github.event.release.tag_name }}
83
-
84
-
85
- update-homebrew-tap:
86
- needs: publish-npm
87
- runs-on: ubuntu-latest
88
- steps:
89
- - name: Get release version
90
- id: version
91
- run: |
92
- RAW="${{ github.event.release.tag_name }}"
93
- echo "version=${RAW#v}" >> "$GITHUB_OUTPUT"
94
-
95
- - name: Compute npm tarball SHA256
96
- id: sha256
97
- run: |
98
- VERSION="${{ steps.version.outputs.version }}"
99
- URL="https://registry.npmjs.org/@shriyanss/js-recon/-/js-recon-${VERSION}.tgz"
100
- SHA=$(curl -fsSL "${URL}" | sha256sum | awk '{print $1}')
101
- echo "sha256=${SHA}" >> "$GITHUB_OUTPUT"
102
-
103
- - name: Check out homebrew-tap
104
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
105
- with:
106
- repository: shriyanss/homebrew-tap
107
- token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
108
- path: homebrew-tap
109
-
110
- - name: Update formula fields
111
- working-directory: homebrew-tap
112
- run: |
113
- VERSION="${{ steps.version.outputs.version }}"
114
- SHA="${{ steps.sha256.outputs.sha256 }}"
115
- F="Formula/js-recon.rb"
116
- sed -i "s|^ url \"https://registry\.npmjs\.org/@shriyanss/js-recon/-/js-recon-[^\"]*\"| url \"https://registry.npmjs.org/@shriyanss/js-recon/-/js-recon-${VERSION}.tgz\"|" "${F}"
117
- sed -i "s|^ sha256 \"[a-f0-9]*\"| sha256 \"${SHA}\"|" "${F}"
118
-
119
- - name: Commit and push
120
- working-directory: homebrew-tap
121
- run: |
122
- git config user.name "github-actions[bot]"
123
- git config user.email "github-actions[bot]@users.noreply.github.com"
124
- git add Formula/js-recon.rb
125
- git commit -m "chore: update js-recon formula to ${{ steps.version.outputs.version }}"
126
- git push
127
-
128
-
129
- publish-docker:
130
- needs: build
131
- runs-on: ubuntu-latest
132
- steps:
133
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
134
- - name: Build and push to dockerhub
77
+ - name: Ensure npm CLI supports OIDC trusted publishing
78
+ run: npm install -g npm@latest
79
+ - name: Stage release to npm via OIDC
135
80
  run: |
136
- # login to docker
137
- echo $DOCKER_SECRET | docker login -u shriyanss --password-stdin
138
-
139
- # build the image
140
- docker build -t shriyanss/js-recon:$VERSION .
141
-
142
- # check if it is alpha or beta. default to latest
143
81
  TAG="latest"
144
82
  [[ "$VERSION" == *"beta"* ]] && TAG="beta"
145
83
  [[ "$VERSION" == *"alpha"* ]] && TAG="alpha"
146
-
147
- # tag again with whatever has been set
148
- docker tag shriyanss/js-recon:$VERSION shriyanss/js-recon:$TAG
149
-
150
- # push images with both tags
151
- docker push shriyanss/js-recon:$VERSION
152
- docker push shriyanss/js-recon:$TAG
153
-
84
+ npm stage publish --tag $TAG
154
85
  env:
155
- DOCKER_SECRET: ${{ secrets.DOCKER_SECRET }}
156
86
  VERSION: ${{ github.event.release.tag_name }}
157
87
 
158
-
159
- publish-ghcr:
160
- needs: build
161
- runs-on: ubuntu-latest
162
- permissions:
163
- contents: read
164
- packages: write
165
- steps:
166
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
167
- - uses: docker/login-action@v3
168
- with:
169
- registry: ghcr.io
170
- username: ${{ github.actor }}
171
- password: ${{ secrets.GITHUB_TOKEN }}
172
- - name: Build and push to github container registry
173
- run: |
174
- # build the image
175
- docker build -t ghcr.io/shriyanss/js-recon:$VERSION .
176
-
177
- # check if it is alpha or beta. default to latest
178
- TAG="latest"
179
- [[ "$VERSION" == *"beta"* ]] && TAG="beta"
180
- [[ "$VERSION" == *"alpha"* ]] && TAG="alpha"
181
-
182
- # tag again with whatever has been set
183
- docker tag ghcr.io/shriyanss/js-recon:$VERSION ghcr.io/shriyanss/js-recon:$TAG
184
-
185
- # push images with both tags
186
- docker push ghcr.io/shriyanss/js-recon:$VERSION
187
- docker push ghcr.io/shriyanss/js-recon:$TAG
188
-
189
- env:
190
- VERSION: ${{ github.event.release.tag_name }}
191
-
192
88
  merge_main_and_dev:
193
89
  needs:
194
90
  - publish-npm
195
- - publish-docker
196
- - publish-ghcr
197
91
  runs-on: ubuntu-latest
198
92
  steps:
199
93
  - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.4.1-alpha.6 - 2026-07-13
4
+
5
+ ### Changed
6
+
7
+ - CI: npm publishing now uses OIDC trusted publishing with staged releases (`npm stage publish`) instead of a classic auth token, since NPM is restricting tokens that bypass MFA. Promoting a staged release to live still requires a manual, 2FA-gated `npm stage approve` — this cannot be automated. The Homebrew tap update and Docker/GHCR image publishing have moved out of `publish-js-recon.yml` into a new manually-triggered workflow, `promote-js-recon.yml`, run after the staged release is approved. That workflow installs js-recon from the published npm registry artifact (`npm pack`/`npm install <pkg>@<version>`) rather than building from git source, as an additional supply-chain safeguard — what ships in the Docker/GHCR images and what Homebrew hashes is provably the same bits that were reviewed and approved on npm. (`ci`)
8
+
3
9
  ## 1.4.1-alpha.5 - 2026-07-13
4
10
 
5
11
  ### Fixed
package/CLAUDE.md CHANGED
@@ -401,26 +401,44 @@ Before writing any files, gather the current state:
401
401
 
402
402
  Previous tag is left to GitHub's automatic detection (do not set `--target` or `--tag` beyond the tag name itself).
403
403
 
404
- 9. **Wait for npm publish** — monitor the release pipeline: `gh run list --repo shriyanss/js-recon --workflow release`. Confirm the npm package is live at the new version before proceeding to Phase 2.
404
+ 9. **Wait for npm stage publish** — monitor the release pipeline: `gh run list --repo shriyanss/js-recon --workflow "Publish JS Recon"`. `publish-npm` uses OIDC trusted publishing (`npm stage publish`, no token) to _stage_ the release this is NOT the same as it being live.
405
405
 
406
- ### Homebrew tap (automatic, runs in parallel with Phase 2)
406
+ 10. **Approve the staged release** — npm's staged-publish approval always requires interactive 2FA, so this step can never be automated or scripted:
407
407
 
408
- After `publish-npm` succeeds, the `update-homebrew-tap` job in `publish-js-recon.yml` runs automatically. It:
408
+ - Find the stage id: `npm stage list @shriyanss/js-recon` (or the "Staged Packages" tab on npmjs.com)
409
+ - Approve it: `npm stage approve <stage-id>` (prompts for 2FA), or click "Approve" on npmjs.com
410
+ - Confirm it's live: `npm view @shriyanss/js-recon@<version>`
409
411
 
410
- 1. Computes the SHA256 of the published npm tarball from the public npmjs.org URL (no auth)
412
+ 11. **Manually trigger the promote workflow** once the release is live, run `promote-js-recon.yml` to update Homebrew and publish the Docker/GHCR images:
413
+
414
+ ```bash
415
+ gh workflow run promote-js-recon.yml --repo shriyanss/js-recon -f version=<version>
416
+ ```
417
+
418
+ This workflow installs js-recon from the published npm registry artifact (`npm pack`/`npm install <pkg>@<version>`) rather than building from git source — an additional supply-chain check that the shipped images/formula match exactly what was approved on npm. Monitor: `gh run list --repo shriyanss/js-recon --workflow "Promote JS Recon Release"`.
419
+
420
+ ### Homebrew tap (manual, part of `promote-js-recon.yml`)
421
+
422
+ The `update-homebrew-tap` job (now in `promote-js-recon.yml`, triggered per step 11 above):
423
+
424
+ 1. `npm pack @shriyanss/js-recon@<version>` — downloads the exact published tarball from the registry and computes its SHA256 locally (no dependency on a public tarball URL being reachable yet)
411
425
  2. Checks out `shriyanss/homebrew-tap` using `HOMEBREW_TAP_TOKEN` (a fine-grained PAT stored in `shriyanss/js-recon` secrets, scoped to `homebrew-tap` repo `Contents: Read and write` only — automatically masked in all log output, never echoed)
412
- 3. Updates `version`, `url`, and `sha256` in `Formula/js-recon.rb` via anchored `sed`
426
+ 3. Updates `url` and `sha256` in `Formula/js-recon.rb` via anchored `sed` — the formula has no explicit `version` field; Homebrew derives it from the `url`
413
427
  4. Commits `chore: update js-recon formula to <version>` and pushes
414
428
 
415
429
  Monitor: `gh run list --repo shriyanss/homebrew-tap --workflow ci.yml`
416
430
 
417
- **If the job fails:** The npm package is already live. Manually update: compute `curl -fsSL <tarball-url> | sha256sum`, edit `Formula/js-recon.rb`, commit, and push to `shriyanss/homebrew-tap`.
431
+ **If the job fails:** manually update: `npm pack @shriyanss/js-recon@<version> && sha256sum shriyanss-js-recon-<version>.tgz`, edit `Formula/js-recon.rb`, commit, and push to `shriyanss/homebrew-tap`.
418
432
 
419
433
  **One-time setup** (must be done before the first release, already completed):
420
434
 
421
435
  - `shriyanss/homebrew-tap` is a public GitHub repo with the formula at `Formula/js-recon.rb`
422
436
  - `HOMEBREW_TAP_TOKEN` is a fine-grained PAT stored in `shriyanss/js-recon` → Settings → Secrets → Actions, scoped exclusively to the `homebrew-tap` repo
423
437
 
438
+ ### Docker / GHCR images (manual, part of `promote-js-recon.yml`)
439
+
440
+ `publish-docker` and `publish-ghcr` (now in `promote-js-recon.yml`) build from `Dockerfile.release` instead of the default `Dockerfile`. `Dockerfile.release` runs `npm install -g @shriyanss/js-recon@<version>` against the live registry rather than copying local source and building — the published images are provably built from the approved npm artifact. The default `Dockerfile` (source build) is unchanged and still used for local/dev builds.
441
+
424
442
  ### Phase 2 — js-recon-docs (after npm is live)
425
443
 
426
444
  10. **Fix doc gaps** — cross-check `docs/docs/modules/*.md` against `src/index.ts` and the new CHANGELOG entries. Add or update any missing flags, options, or command descriptions.
@@ -0,0 +1,29 @@
1
+ FROM ghcr.io/puppeteer/puppeteer:25.3.0
2
+
3
+ WORKDIR /home/pptruser
4
+
5
+ USER root
6
+ ENV PUPPETEER_SKIP_DOWNLOAD=true
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ unzip \
9
+ libnspr4 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
10
+ libxcomposite1 libxdamage1 libxrandr2 libgbm1 libxkbcommon0 \
11
+ libasound2 libpangocairo-1.0-0 libxfixes3 libxi6 libxinerama1 \
12
+ libxcursor1 libdrm2 && \
13
+ rm -rf /var/lib/apt/lists/*
14
+
15
+ ARG JS_RECON_VERSION
16
+ RUN npm install -g @shriyanss/js-recon@${JS_RECON_VERSION}
17
+
18
+ USER pptruser
19
+ RUN "$(npm root -g)/@shriyanss/js-recon/node_modules/.bin/puppeteer" browsers install chrome && \
20
+ for zip in /home/pptruser/.cache/puppeteer/chrome/*-chrome-linux64.zip; do \
21
+ [ -f "$zip" ] || break; \
22
+ version="${zip%-chrome-linux64.zip}"; version="${version##*/}"; \
23
+ dest="/home/pptruser/.cache/puppeteer/chrome/linux-${version}"; \
24
+ unzip -o "$zip" -d "${dest}/" && chmod +x "${dest}/chrome-linux64/chrome"; \
25
+ done
26
+
27
+ ENV IS_DOCKER=true
28
+ ENV NODE_OPTIONS="--max-http-header-size=99999999"
29
+ ENTRYPOINT ["js-recon"]
@@ -1,6 +1,6 @@
1
1
  const githubURL = "https://github.com/shriyanss/js-recon";
2
2
  const modulesDocs = "https://js-recon.io/docs/category/modules";
3
- const version = "1.4.1-alpha.5";
3
+ const version = "1.4.1-alpha.6";
4
4
  const toolDesc = "JavaScript Enumeration and SAST";
5
5
  const axiosNonHttpMethods = ["isAxiosError"]; // methods available in axios, which are not for making HTTP requests
6
6
  let CONFIG = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shriyanss/js-recon",
3
- "version": "1.4.1-alpha.5",
3
+ "version": "1.4.1-alpha.6",
4
4
  "description": "JS Recon Tool",
5
5
  "main": "build/index.js",
6
6
  "type": "module",