@metasession.co/devaudit-cli 0.1.31 → 0.1.33

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.31",
3
+ "version": "0.1.33",
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.31",
36
+ "@metasession.co/devaudit-plugin-sdk": "^0.1.33",
37
37
  "commander": "^12.1.0",
38
38
  "consola": "^3.2.3",
39
39
  "env-paths": "^3.0.0",
@@ -29,7 +29,7 @@ description: Compile test, security, and AI evidence, update RTM, create release
29
29
  | `compliance/evidence/REQ-XXX/test-scope.md` | Git | Planning artifact, reviewed in PRs |
30
30
  | `compliance/evidence/REQ-XXX/implementation-plan.md` | Git | Design decisions artifact (MEDIUM/HIGH risk), reviewed in PRs |
31
31
  | `compliance/evidence/REQ-XXX/test-plan.md` | Git | Test strategy — tests to add/update/remove, mapped to criteria |
32
- | `compliance/evidence/REQ-XXX/test-execution-summary.md` | Git | Gate results, test changes, coverage against test plan |
32
+ | `compliance/evidence/REQ-XXX/test-execution-summary.md` | Git | Gate results, test changes, coverage against test plan. **ISO 29119-3 §3.5.6 Test Completion Report for THIS release** — uploaded as `evidence_type=test_report` since v0.1.32, satisfying the portal's Test Reports gate with fresh per-release evidence. |
33
33
  | `compliance/evidence/REQ-XXX/ai-use-note.md` | Git | Small markdown, needs PR review |
34
34
  | `compliance/evidence/REQ-XXX/ai-prompts.md` | Git | Small markdown, needs PR review |
35
35
  | `compliance/evidence/REQ-XXX/security-summary.md` | Git | Small markdown, needs PR review |
@@ -430,17 +430,18 @@ jobs:
430
430
  --category test_report ${FLAGS}
431
431
  fi
432
432
 
433
- # Upload test summary report precise evidence_type=test_report
434
- # (was compliance_document). The portal's Compliance Gates panel
435
- # filters by evidence_type, so the markdown summary belongs in the
436
- # Test Reports gate alongside playwright-report.zip + coverage
437
- # summary. Markdown renders inline (MarkdownRenderer); auditor
438
- # reads pass/fail counts + narrative without downloading the zip.
439
- # devaudit#370 follow-up.
433
+ # Upload project-level Test Summary Report as a baseline
434
+ # `compliance_document`. As of v0.1.32 this is NOT a per-release
435
+ # gate artefact the Test Reports gate is satisfied by the
436
+ # per-REQ `test-execution-summary.md` uploaded by
437
+ # compliance-evidence.yml (carries fresh release-specific data).
438
+ # The project-level TSR remains useful as Documents-tab baseline
439
+ # describing the project's testing posture but no longer poses
440
+ # as per-release test evidence. See DevAudit-Installer#101.
440
441
  if [ -f "compliance/test-summary-report.md" ]; then
441
442
  upload test-summary-report.md \
442
- {{PROJECT_SLUG}} _compliance-docs test_report compliance/test-summary-report.md \
443
- --category test_report ${FLAGS}
443
+ {{PROJECT_SLUG}} _compliance-docs compliance_document compliance/test-summary-report.md \
444
+ --category planning ${FLAGS}
444
445
  fi
445
446
 
446
447
  # Upload per-AC e2e evidence screenshots, scoped to each in-scope
@@ -138,15 +138,20 @@ jobs:
138
138
  fi
139
139
  done
140
140
 
141
- # Test summary reportprecise evidence_type=test_report so it
142
- # lands in the portal's Test Reports gate (rendered inline by the
143
- # MarkdownRenderer). devaudit#370 follow-up; same change applied
144
- # in ci.yml's gate-evidence upload step.
141
+ # Project-level Test Summary Reporta hand-authored baseline
142
+ # describing the project's testing posture. As of v0.1.32 this is
143
+ # uploaded as `compliance_document` (NOT `test_report`) — the
144
+ # per-release Test Reports gate is now satisfied by the per-REQ
145
+ # `test-execution-summary.md` uploaded in the in-scope-requirements
146
+ # loop below, which carries fresh release-specific data. The
147
+ # project-level TSR continues to ship as a Documents-tab baseline
148
+ # but no longer poses as per-release test evidence.
149
+ # See DevAudit-Installer#101.
145
150
  if [ -f "compliance/test-summary-report.md" ]; then
146
- echo "Uploading: test-summary-report.md (test_report type)"
151
+ echo "Uploading: test-summary-report.md (compliance_document — baseline)"
147
152
  bash scripts/upload-evidence.sh \
148
- {{PROJECT_SLUG}} _compliance-docs test_report compliance/test-summary-report.md \
149
- --category test_report ${FLAGS} --release "${DERIVED_RELEASE}" \
153
+ {{PROJECT_SLUG}} _compliance-docs compliance_document compliance/test-summary-report.md \
154
+ --category planning ${FLAGS} --release "${DERIVED_RELEASE}" \
150
155
  "${DERIVED_META[@]}" \
151
156
  || echo "Warning: Failed to upload test-summary-report.md"
152
157
  fi
@@ -181,6 +186,38 @@ jobs:
181
186
  upload_governance compliance/incident-report.md incident_report
182
187
  upload_governance compliance/governance/incident-report.md incident_report
183
188
 
189
+ # ── Audit-log export (DevAudit-Installer#98 WS2) ──────────────
190
+ # Snapshot the portal's audit log for the rolling 90-day window
191
+ # and upload as `evidence_type=audit_log`. Closes three
192
+ # framework-coverage clauses on every release:
193
+ # - ISO27001.A.8.16 — Monitoring activities
194
+ # - EUAIA.Art-12 — Record-keeping (automatic logging)
195
+ # - GDPR.Art-32 — Security of processing (audit-log half)
196
+ #
197
+ # The portal endpoint defaults to the last 90 days when no
198
+ # `since`/`until` query params are passed; omit them so the
199
+ # consumer side stays zero-config. Endpoint shipped in
200
+ # META-COMPLY PR #413; project-scoped API key (uploader role)
201
+ # already has read access via `resolveCiUploadAuth`.
202
+ AUDIT_LOG_FILE="$(mktemp -t audit-log-XXXXXX.json)"
203
+ if curl -sSf -H "Authorization: Bearer ${DEVAUDIT_API_KEY}" \
204
+ "${DEVAUDIT_BASE_URL%/}/api/ci/projects/{{PROJECT_SLUG}}/audit-log/export" \
205
+ -o "$AUDIT_LOG_FILE"; then
206
+ echo "Uploading: audit-log.json (audit_log — 90-day window)"
207
+ bash scripts/upload-evidence.sh \
208
+ {{PROJECT_SLUG}} _compliance-docs audit_log "$AUDIT_LOG_FILE" \
209
+ --category compliance_document ${FLAGS} --release "${DERIVED_RELEASE}" \
210
+ "${DERIVED_META[@]}" \
211
+ || echo "Warning: Failed to upload audit-log.json"
212
+ else
213
+ # Soft-fail: an export hiccup shouldn't break the rest of the
214
+ # evidence pipeline. Surfaces as a warning in the workflow log;
215
+ # the framework-coverage panel will show MISSING for the three
216
+ # clauses above until the next successful upload.
217
+ echo "::warning::Audit-log export failed — endpoint unreachable or 4xx/5xx. Three framework-coverage clauses (ISO27001.A.8.16, EUAIA.Art-12, GDPR.Art-32 audit-log half) will stay MISSING until the next run."
218
+ fi
219
+ rm -f "$AUDIT_LOG_FILE"
220
+
184
221
  # Helper: emit a `--release-title …` `--change-type …` pair for a given
185
222
  # REQ, derived from its pending release-ticket H1 and the most recent
186
223
  # commit attributed to that REQ. Empty pair when neither is available.
@@ -257,12 +294,28 @@ jobs:
257
294
  REQ_META_ARGS=$(req_meta_args "$REQ_ID")
258
295
  for ARTIFACT in "$REQ_DIR"*.md; do
259
296
  [ -f "$ARTIFACT" ] || continue
260
- echo "Uploading: ${REQ_ID}/$(basename "$ARTIFACT")"
297
+ # Per-REQ test-execution-summary.md is the ISO 29119-3 §3.5.6
298
+ # Test Completion Report for THIS release cycle (populated by
299
+ # the e2e-test-engineer skill in Stage 3 — scope, results, AC
300
+ # mapping, defects). Upload as `test_report` so it satisfies
301
+ # the portal's Test Reports gate with per-release evidence
302
+ # instead of the project-level evergreen TSR (which from
303
+ # v0.1.32 downgrades to `compliance_document`). See
304
+ # DevAudit-Installer#101.
305
+ BASENAME=$(basename "$ARTIFACT")
306
+ if [ "$BASENAME" = "test-execution-summary.md" ] || [ "$BASENAME" = "test-summary-report.md" ]; then
307
+ EVTYPE=test_report
308
+ EVCAT=test_report
309
+ else
310
+ EVTYPE=compliance_document
311
+ EVCAT=planning
312
+ fi
313
+ echo "Uploading: ${REQ_ID}/${BASENAME} (${EVTYPE})"
261
314
  eval "bash scripts/upload-evidence.sh \
262
- {{PROJECT_SLUG}} \"${REQ_ID}\" compliance_document \"$ARTIFACT\" \
263
- --category planning ${FLAGS} --release \"${REQ_ID}\" \
315
+ {{PROJECT_SLUG}} \"${REQ_ID}\" ${EVTYPE} \"$ARTIFACT\" \
316
+ --category ${EVCAT} ${FLAGS} --release \"${REQ_ID}\" \
264
317
  ${REQ_META_ARGS}" \
265
- || echo "Warning: Failed to upload $(basename "$ARTIFACT")"
318
+ || echo "Warning: Failed to upload ${BASENAME}"
266
319
  done
267
320
  done
268
321
  fi