Skip to content

Commit 8325969

Browse files
h0tak88rclaude
andcommitted
feat(programs): add per-program scope summary endpoint and inline UI counts
- New POST /api/scope/program-summaries endpoint fetches scope details on demand for a list of (platform, handle) pairs. Results are cached so repeat lookups are cheap. - fetchH1Programs / fetchH1WithREST / fetchBCPrograms grow an includeScope flag; when true they call fetchH1ScopeSummary / fetchBCScopeSummary per program to populate in-scope and out-of-scope target counts. - programScopeCacheKey + cache plumbing keys results by (platform, handle). - programs.js renders scope counts inline in the monitoring table and triggers the summary endpoint as rows become visible. - .gitignore: exclude local .cache/ directory used by the new cache layer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 5667376 commit 8325969

4 files changed

Lines changed: 399 additions & 135 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ tmp_*
8080

8181
# Generated files
8282
generate_from_env.sh
83+
.cache/
8384

8485
# External dependencies
8586
# nuclei_templates/ # Now using as submodule

internal/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ func SetupAPI() *gin.Engine {
568568
apiGroup.POST("/scope/fetch", apiFetchScope)
569569
apiGroup.GET("/scope/platforms", apiScopePlatforms)
570570
apiGroup.GET("/scope/programs", apiListPrograms)
571+
apiGroup.POST("/scope/program-summaries", apiProgramScopeSummaries)
571572
// AI finding validation & reporting
572573
apiGroup.POST("/findings/validate", apiValidateFinding)
573574
apiGroup.POST("/findings/report", apiReportFinding)
@@ -1879,4 +1880,3 @@ func shouldSkipArtifact(path string) bool {
18791880

18801881
return false
18811882
}
1882-

0 commit comments

Comments
 (0)