Commit 5ddc924
committed
NV-4462 Scope the demo DAST scan and make it reliable
The "Test Case - Java Spring App" workflow scanned on every push to main.
With a NIGHTVISION_TOKEN secret configured (the javaspringvulny target and
auth are seeded in every account) the scan runs for real, so it should run
only when a push can actually affect it, should not silently mask spec
extraction failures, and should not race the app's startup.
- Add a paths-ignore filter so a push touching only docs, other-platform
CI glue, or the manual-only sibling notification workflows does not
trigger a scan. App source, specs, Dockerfile/compose, build files, scan
config, and this workflow still trigger one.
- Make spec extraction assert a non-empty spec: extract to a local file and
drop the `|| true` mask and backup-spec fallback, so a real API Discovery
regression turns the run red instead of silently scanning with a stale
spec.
- Replace the fixed `sleep 10` after `docker compose up` with a readiness
poll: curl the app until it accepts connections (compose's depends_on
waits only for container start, and a Spring Boot + Postgres cold start
routinely exceeds 10s). On timeout, dump compose logs and fail loudly
instead of letting the auth replay and scan flake.1 parent f50e51c commit 5ddc924
2 files changed
Lines changed: 38 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
18 | 34 | | |
19 | 35 | | |
20 | 36 | | |
| |||
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
39 | 58 | | |
40 | 59 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 60 | + | |
| 61 | + | |
45 | 62 | | |
46 | | - | |
47 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
48 | 78 | | |
49 | 79 | | |
50 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
0 commit comments