@metasession.co/devaudit-cli 0.1.63 → 0.1.64

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metasession.co/devaudit-cli",
3
- "version": "0.1.63",
3
+ "version": "0.1.64",
4
4
  "description": "DevAudit CLI — installs, syncs, and operates the Metasession SDLC across consumer projects.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@clack/prompts": "^0.8.2",
36
- "@metasession.co/devaudit-plugin-sdk": "^0.1.63",
36
+ "@metasession.co/devaudit-plugin-sdk": "file:../plugin-sdk",
37
37
  "ajv": "^8.20.0",
38
38
  "commander": "^12.1.0",
39
39
  "consola": "^3.2.3",
@@ -0,0 +1,11 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(git init:*)",
5
+ "Bash(git add:*)",
6
+ "Bash(git branch:*)",
7
+ "Bash(git commit:*)",
8
+ "Bash(gh repo:*)"
9
+ ]
10
+ }
11
+ }
@@ -190,22 +190,42 @@ jobs:
190
190
  # PRs to develop should report Quality Gates without mutating DevAudit
191
191
  # releases or evidence. Release registration remains a develop-push /
192
192
  # manual-dispatch side effect.
193
- if: ${{ github.event_name != 'pull_request' && vars.DEVAUDIT_BASE_URL != '' }}
193
+ if: ${{ github.event_name != 'pull_request' }}
194
194
  outputs:
195
195
  version: ${{ steps.version.outputs.version }}
196
196
  env:
197
- DEVAUDIT_BASE_URL: ${{ vars.DEVAUDIT_BASE_URL }}
197
+ DEVAUDIT_BASE_URL_VAR: ${{ vars.DEVAUDIT_BASE_URL }}
198
198
  DEVAUDIT_API_KEY: ${{ secrets.DEVAUDIT_API_KEY }}
199
199
  steps:
200
200
  - uses: actions/checkout@v6
201
201
 
202
- - name: Validate DevAudit env
202
+ - name: Resolve DevAudit base URL
203
203
  run: |
204
- if [ -z "${DEVAUDIT_BASE_URL}" ] || [ -z "${DEVAUDIT_API_KEY}" ]; then
205
- echo "::error::DEVAUDIT_BASE_URL (variable) and DEVAUDIT_API_KEY (secret) must both be set."
204
+ # Prefer sdlc-config.json devaudit.base_url (PR-visible) over the
205
+ # deprecated repo Variable matching the node template and
206
+ # compliance-evidence.yml. DevAudit-Installer#156: gating this job
207
+ # on `vars.DEVAUDIT_BASE_URL` silently skipped release registration
208
+ # + evidence upload for consumers that moved base_url into
209
+ # sdlc-config.json (the v1.23.0 direction).
210
+ BASE=""
211
+ if [ -f sdlc-config.json ]; then
212
+ CONFIG_URL=$(jq -r '.devaudit.base_url // empty' sdlc-config.json 2>/dev/null || true)
213
+ [ -n "$CONFIG_URL" ] && BASE="$CONFIG_URL"
214
+ fi
215
+ if [ -n "$BASE" ]; then
216
+ echo "Using devaudit.base_url from sdlc-config.json: $BASE"
217
+ elif [ -n "$DEVAUDIT_BASE_URL_VAR" ]; then
218
+ BASE="$DEVAUDIT_BASE_URL_VAR"
219
+ echo "::warning::Using repo Variable DEVAUDIT_BASE_URL (deprecated in v1.23.0). Move base_url to sdlc-config.json devaudit.base_url for PR-visible config."
220
+ else
221
+ echo "::warning::No DevAudit base URL configured — skipping release registration. Set devaudit.base_url in sdlc-config.json."
222
+ fi
223
+ if [ -n "$BASE" ] && [ -z "${DEVAUDIT_API_KEY}" ]; then
224
+ echo "::error::DEVAUDIT_API_KEY (secret) must be set when a DevAudit base URL is configured."
206
225
  exit 1
207
226
  fi
208
- echo "BASE=${DEVAUDIT_BASE_URL%/}" >> "$GITHUB_ENV"
227
+ echo "BASE=${BASE%/}" >> "$GITHUB_ENV"
228
+ echo "DEVAUDIT_BASE_URL=${BASE%/}" >> "$GITHUB_ENV"
209
229
 
210
230
  - name: Determine release version
211
231
  id: version
@@ -294,13 +314,33 @@ jobs:
294
314
  # evidence — `status=failed` is itself the audit trail. `!cancelled()`
295
315
  # still guards against partial state on operator-cancel.
296
316
  # DevAudit-Installer#96.
297
- if: ${{ always() && !cancelled() && vars.DEVAUDIT_BASE_URL != '' && needs.register-release.result == 'success' }}
317
+ if: ${{ always() && !cancelled() && needs.register-release.result == 'success' }}
298
318
  env:
299
- DEVAUDIT_BASE_URL: ${{ vars.DEVAUDIT_BASE_URL }}
319
+ DEVAUDIT_BASE_URL_VAR: ${{ vars.DEVAUDIT_BASE_URL }}
300
320
  DEVAUDIT_API_KEY: ${{ secrets.DEVAUDIT_API_KEY }}
301
321
  steps:
302
322
  - uses: actions/checkout@v6
303
323
 
324
+ - name: Resolve DevAudit base URL
325
+ run: |
326
+ # Prefer sdlc-config.json devaudit.base_url over the deprecated repo
327
+ # Variable (DevAudit-Installer#156). When neither is set the upload
328
+ # step below no-ops via `if: env.DEVAUDIT_BASE_URL != ''`.
329
+ BASE=""
330
+ if [ -f sdlc-config.json ]; then
331
+ CONFIG_URL=$(jq -r '.devaudit.base_url // empty' sdlc-config.json 2>/dev/null || true)
332
+ [ -n "$CONFIG_URL" ] && BASE="$CONFIG_URL"
333
+ fi
334
+ if [ -n "$BASE" ]; then
335
+ echo "Using devaudit.base_url from sdlc-config.json: $BASE"
336
+ elif [ -n "$DEVAUDIT_BASE_URL_VAR" ]; then
337
+ BASE="$DEVAUDIT_BASE_URL_VAR"
338
+ echo "::warning::Using repo Variable DEVAUDIT_BASE_URL (deprecated in v1.23.0). Move base_url to sdlc-config.json devaudit.base_url for PR-visible config."
339
+ else
340
+ echo "::warning::No DevAudit base URL configured — skipping evidence upload. Set devaudit.base_url in sdlc-config.json."
341
+ fi
342
+ echo "DEVAUDIT_BASE_URL=${BASE%/}" >> "$GITHUB_ENV"
343
+
304
344
  # Download to workspace root: upload-artifact@v4 preserves the file's
305
345
  # workspace-relative path (e.g. mission-control-api/ci-evidence/sast.json
306
346
  # for a subdir project). Downloading with path: '.' restores files to