[scan] Security attack vector mapping #8
Labels
No labels
needs-review
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
-
Dependencies
No dependencies set.
Reference: core/go-ai#8
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Map every external input entry point: function, file:line, input source, flows into, validation, attack vector.
Implementation Plan (Spark)
[scan] Security attack vector mapping — implementation plan
Use this issue body as the execution plan for the scan.
1) Files to scan
Scope includes all source and test files in the repository, plus CLI/CI entry files that can change execution behaviour:
cmd/security/cmd_security.gocmd/security/cmd_scan.gocmd/security/cmd_jobs.gocmd/security/cmd_alerts.gocmd/security/cmd_deps.gocmd/security/cmd_secrets.gocmd/security/cmd.gocmd/metrics/cmd.gocmd/metrics/cmd_test.gocmd/rag/cmd.gocmd/lab/cmd_lab.gocmd/embed-bench/main.goai/ai.goai/metrics.goai/rag.goai/metrics_test.goai/metrics_bench_test.go.forgejo/workflows/security-scan.yml2) What to inspect per file
For each file, map:
3) Output format for every finding
Add one row per finding in this order:
cmd/security/cmd_security.go:16securityTarget,securityRepo,securitySeverity,securityRegistryPath,securityJSON)cmd/security/cmd_scan.go:27--registry,--repo,--severity,--tool,--target,--jsonflagsloadRegistry, filtering, API fetches, terminal outputcmd/security/cmd_alerts.go:21alertscmd/security/cmd_deps.go:21depscmd/security/cmd_secrets.go:21secretscmd/security/cmd_jobs.go:22--targets,--issue-repo,--dry-run,--copiesgh issue create) and metric writestargetformat check only)targetspayload can exhaust command output/report sizecmd/security/cmd_security.go:130ghbinary path lookup + external command executionrunGHAPIrunsgh apiwithendpointargcmd/security/cmd_security.go:108securityRegistryPathstring flagrepos.LoadRegistry(io.Local, registryPath)and fallback discoverycmd/security/cmd_security.go:194targetstring (owner/repo) split validationrun*ForTargetentrypoints and API endpoint buildersowner/repoonly split, no char/class checks)gh api, issue labels) and logscmd/security/cmd_security.go:300repoFullNamein GitHub endpoint buildersfetchDependabotAlerts/fetchCodeScanningAlerts/fetchSecretScanningAlertscmd/lab/cmd_lab.go:42--bindCLI flaghttp.Server{Addr: cfg.Addr}and route handlerscmd/lab/cmd_lab.go:24cfgfrom runtime config (cfg.ForgeURL, tokens, intervals, etc.)cmd/embed-bench/main.go:28--ollamaURL flag/api/embeddings,/api/tagscmd/embed-bench/main.go:223InsecureSkipVerify)cmd/embed-bench/main.go:238queries/memory arrayscmd/metrics/cmd.go:31--sincestringparseDuration->time.Now().Add(-since)cmd/metrics/cmd.go:105--sincevalue formatparseDurationnumeric parsing and unit switchai/metrics.go:46metricsSinceruntime-derived file path/time windowRecord/ReadEventsfile writes and readsRecord; concurrentReadEventsmay observe partially written lines without lockai/metrics.go:87time.TimeinputreadMetricsFilescanner loopai/rag.go:22TaskInfo.TitleandTaskInfo.Descriptionrag.Query)ai/metrics_test.go/ai/metrics_bench_test.go/cmd/metrics/cmd_test.go4) Where to write the report
SECURITY_ATTACK_VECTOR_MAPPING_REPORT.mdExecution steps (for Codex agent)
cmd/security/cmd_security.go, then expand into each security subcommand file and shared helpers.exec.Commandcall boundary (gh, lab config flow, issue creation) and enumerate argument construction.targetparsing for format and traversal/command/endpoint poisoning.embed-bench,ai/rag, lab collectors viacfg) for trust boundaries and hardening.metricsMu, shared CLI variables, and test overrides.file:line+ snippet context).Security Scan: Attack Vector Map completed. Details in agent log.