|
10 | 10 |
|
11 | 11 |
|
12 | 12 | Packages, Advisories and Contacts endpoints are implemented. Blast Radius |
13 | | - is specced separately and not yet built. |
| 13 | + submit (2a) is implemented but the reachability pipeline is not built yet — |
| 14 | + every submitted job currently fails with an ECOSYSTEM_NOT_SUPPORTED error |
| 15 | + once the underlying workflow runs. Poll (2b), the 7-day result cache, and |
| 16 | + the actual analysis are specced separately and not yet built. |
14 | 17 |
|
15 | 18 |
|
16 | 19 | TODO: scopes below (read:packages, read:stewardships) are the existing |
|
45 | 48 | it, the implementation requires read:maintainer-roles (NOT read:packages). |
46 | 49 | The response shape is still under discussion upstream (reportingMethods / |
47 | 50 | reportingGuidelines / integrationHints are reserved and always null today). |
| 51 | + - name: Blast Radius |
| 52 | + description: > |
| 53 | + Advisory reachability analysis — submit (2a) is implemented; poll (2b) is |
| 54 | + not built yet. Submitting kicks off a Temporal workflow which currently |
| 55 | + fails every job with ECOSYSTEM_NOT_SUPPORTED, since the reachability |
| 56 | + pipeline itself hasn't shipped. Rate-limited independently of the other |
| 57 | + akrites-external endpoints (default 5 requests/hour, configurable via |
| 58 | + AKRITES_BLAST_RADIUS_RATE_LIMIT_MAX / _WINDOW_MS). Same interim scope |
| 59 | + note as Advisories applies (read:packages, pending a dedicated |
| 60 | + read:advisories scope). |
48 | 61 |
|
49 | 62 | components: |
50 | 63 | securitySchemes: |
@@ -361,6 +374,58 @@ components: |
361 | 374 | allOf: |
362 | 375 | - $ref: '#/components/schemas/AdvisoryDetail' |
363 | 376 |
|
| 377 | + BlastRadiusJobRequest: |
| 378 | + type: object |
| 379 | + required: [advisoryId] |
| 380 | + properties: |
| 381 | + advisoryId: |
| 382 | + type: string |
| 383 | + description: GHSA or CVE identifier. |
| 384 | + example: GHSA-jf85-cpcp-j695 |
| 385 | + ecosystem: |
| 386 | + type: string |
| 387 | + nullable: true |
| 388 | + description: Optional, only meaningful alongside package. |
| 389 | + example: npm |
| 390 | + package: |
| 391 | + type: string |
| 392 | + nullable: true |
| 393 | + description: > |
| 394 | + Optional. Full purl or bare package name. If omitted, the analysis |
| 395 | + is advisory-wide: reachability is evaluated across every package |
| 396 | + the advisory affects, returned as one aggregate result — not one |
| 397 | + job per affected package. |
| 398 | + force: |
| 399 | + type: boolean |
| 400 | + default: false |
| 401 | + description: Bypasses the 7-day cache and always triggers a new run. Use sparingly. |
| 402 | + |
| 403 | + BlastRadiusJobEntry: |
| 404 | + type: object |
| 405 | + required: [analysisId, advisoryId, package, ecosystem, status] |
| 406 | + description: Response body of 2a — one job per request, never wrapped in an array. |
| 407 | + properties: |
| 408 | + analysisId: |
| 409 | + type: string |
| 410 | + description: Opaque identifier for polling via 2b (not yet implemented). |
| 411 | + advisoryId: |
| 412 | + type: string |
| 413 | + package: |
| 414 | + type: string |
| 415 | + nullable: true |
| 416 | + description: Echoes the request's package. Null when the request omitted it. |
| 417 | + ecosystem: |
| 418 | + type: string |
| 419 | + nullable: true |
| 420 | + description: Echoes the request's ecosystem. Null when the request omitted it. |
| 421 | + status: |
| 422 | + type: string |
| 423 | + enum: [pending, running, done, failed] |
| 424 | + description: > |
| 425 | + Always pending today — every job starts a Temporal workflow that |
| 426 | + currently fails with ECOSYSTEM_NOT_SUPPORTED once it runs, since |
| 427 | + the reachability pipeline isn't built yet. |
| 428 | +
|
364 | 429 | ContactConfidenceBand: |
365 | 430 | type: string |
366 | 431 | enum: [PRIMARY, SECONDARY, FALLBACK, NONE] |
@@ -806,6 +871,65 @@ paths: |
806 | 871 | schema: |
807 | 872 | $ref: '#/components/schemas/Error' |
808 | 873 |
|
| 874 | + /akrites-external/blast-radius/jobs: |
| 875 | + post: |
| 876 | + operationId: submitBlastRadiusJob |
| 877 | + summary: 2a — Submit a blast-radius analysis job |
| 878 | + description: > |
| 879 | + Always exactly one job per request — no bulk submit. Omit package for |
| 880 | + an advisory-wide analysis; provide it to narrow to a single package. |
| 881 | +
|
| 882 | +
|
| 883 | + Not yet implemented: the 7-day result cache, force-bypass semantics, |
| 884 | + and the actual reachability pipeline. Today every submission starts a |
| 885 | + fresh Temporal workflow that fails with ECOSYSTEM_NOT_SUPPORTED — the |
| 886 | + job is accepted and echoed back as pending, but never completes. |
| 887 | + tags: [Blast Radius] |
| 888 | + security: |
| 889 | + - M2MBearer: |
| 890 | + - read:packages |
| 891 | + requestBody: |
| 892 | + required: true |
| 893 | + content: |
| 894 | + application/json: |
| 895 | + schema: |
| 896 | + $ref: '#/components/schemas/BlastRadiusJobRequest' |
| 897 | + responses: |
| 898 | + '202': |
| 899 | + description: Job accepted. |
| 900 | + content: |
| 901 | + application/json: |
| 902 | + schema: |
| 903 | + $ref: '#/components/schemas/BlastRadiusJobEntry' |
| 904 | + '400': |
| 905 | + description: > |
| 906 | + Validation error (missing/empty advisoryId), or an unsupported |
| 907 | + ecosystem — only npm is supported today, so any other value |
| 908 | + (including a missing ecosystem) is rejected before a workflow |
| 909 | + is started. |
| 910 | + content: |
| 911 | + application/json: |
| 912 | + schema: |
| 913 | + $ref: '#/components/schemas/Error' |
| 914 | + '401': |
| 915 | + description: Missing or invalid bearer token. |
| 916 | + content: |
| 917 | + application/json: |
| 918 | + schema: |
| 919 | + $ref: '#/components/schemas/Error' |
| 920 | + '403': |
| 921 | + description: Token missing read:packages scope. |
| 922 | + content: |
| 923 | + application/json: |
| 924 | + schema: |
| 925 | + $ref: '#/components/schemas/Error' |
| 926 | + '429': |
| 927 | + description: Too many requests — rate-limited independently of the other endpoints. |
| 928 | + content: |
| 929 | + application/json: |
| 930 | + schema: |
| 931 | + $ref: '#/components/schemas/Error' |
| 932 | + |
809 | 933 | /akrites-external/contacts/detail: |
810 | 934 | get: |
811 | 935 | operationId: getContactDetail |
|
0 commit comments