Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alpha-omega-security/scrutineer
/ functions
Functions
2,165 in github.com/alpha-omega-security/scrutineer
⨍
Functions
2,165
◇
Types & classes
203
↓ 408 callers
Function
newTestServer
(t testing.TB)
internal/web/server_test.go:24
↓ 396 callers
Method
Error
()
internal/web/org_import.go:70
↓ 315 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/worker/egress.go:174
↓ 296 callers
Method
Handler
()
internal/web/server.go:312
↓ 264 callers
Method
String
()
cmd/scrutineer/main.go:62
↓ 181 callers
Method
Set
(v string)
cmd/scrutineer/main.go:63
↓ 157 callers
Function
localReq
(method, path string)
internal/web/server_test.go:46
↓ 98 callers
Method
Error
()
internal/worker/skill.go:651
↓ 97 callers
Function
Open
(dsn string)
internal/db/db.go:1074
↓ 83 callers
Function
writeAPIError
(w http.ResponseWriter, code int, msg string)
internal/web/api.go:482
↓ 55 callers
Method
bin
bin returns the executable name, defaulting to docker so the zero value stays valid. Mirrors ContainerRunner.image()'s empty-default pattern.
internal/worker/runtime.go:46
↓ 50 callers
Method
redirect
redirect sends a 303 for plain form posts and HX-Redirect for htmx requests, so every POST handler works with or without javascript.
internal/web/server.go:483
↓ 41 callers
Function
StatusPriorityFor
(s ScanStatus)
internal/db/db.go:1040
↓ 41 callers
Function
writeSkill
(t *testing.T, dir, name, content string)
internal/skills/parse_test.go:15
↓ 39 callers
Method
parseFindingsOutput
parseFindingsOutput feeds the existing spec-deep parser so skill-driven audits surface in the Findings tab alongside the legacy claude job. Findings a
internal/worker/skill.go:367
↓ 38 callers
Function
ParseFile
ParseFile reads a single SKILL.md (with its sibling schema.json if any) and returns a Parsed. Errors here are hard failures: unparseable YAML, missing
internal/skills/parse.go:163
↓ 38 callers
Function
seedCSAFFinding
(t *testing.T, s *Server, mut func(*db.Finding))
internal/web/finding_csaf_test.go:17
↓ 36 callers
Function
decodeCSAF
(t *testing.T, body []byte)
internal/web/finding_csaf_test.go:74
↓ 35 callers
Function
hasAdjacent
hasAdjacent reports whether args contains flag immediately followed by val, matching how a container `run` takes `-v host:container` / `-e KEY=VAL` pa
internal/worker/container_test.go:239
↓ 33 callers
Function
writeJSON
(w http.ResponseWriter, code int, v any)
internal/web/api.go:476
↓ 31 callers
Function
WriteFindingField
WriteFindingField updates a Finding column and records the change in FindingHistory. Callers pass the JSON-style field name (severity, cvss_vector, st
internal/db/finding_helpers.go:43
↓ 31 callers
Function
loadByID
loadByID loads the row whose primary key matches the request's {id} path parameter, writing a 404 and returning ok=false when it does not exist. It co
internal/web/server.go:804
↓ 30 callers
Method
render
(w http.ResponseWriter, r *http.Request, name string, data map[string]any)
internal/web/server.go:410
↓ 30 callers
Function
run
(log *slog.Logger)
cmd/scrutineer/main.go:323
↓ 28 callers
Method
Info
(msg string, args ...any)
internal/queue/queue.go:179
↓ 28 callers
Method
enqueueSkillWith
enqueueSkillWith creates a skill scan using the given ScanOpts. Empty fields default cleanly: unset FindingID means not-finding-scoped, empty SubPath
internal/web/server.go:2339
↓ 28 callers
Function
seedRunningScan
seedRunningScan creates a repo + running scan with an API token so API calls made with that token are authorised.
internal/web/api_test.go:18
↓ 26 callers
Function
postForm
(t *testing.T, s *Server, path string, form url.Values)
internal/web/settings_handlers_test.go:14
↓ 25 callers
Function
setFlash
(w http.ResponseWriter, f Flash)
internal/web/server.go:435
↓ 24 callers
Function
git
(ctx context.Context, dir string, args ...string)
internal/worker/clone.go:235
↓ 24 callers
Method
wrap
wrap turns a handler into a goqite jobs.Func: decode payload, load the scan row, run the handler, persist status/log/report. Errors from the handler m
internal/worker/worker.go:464
↓ 21 callers
Method
IsLocal
IsLocal reports whether this Repository points at a directory on disk (file://<abs-path>) rather than a remote git URL. Used by the worker to skip the
internal/db/db.go:117
↓ 21 callers
Function
getCSAF
(t *testing.T, s *Server, id uint)
internal/web/finding_csaf_test.go:83
↓ 21 callers
Function
getOSV
(t *testing.T, s *Server, id uint)
internal/web/finding_osv_test.go:14
↓ 20 callers
Function
FingerprintFinding
FingerprintFinding returns a stable hash for deduplicating the same vulnerability reported across repeated scans of one repository. The inputs are th
internal/db/fingerprint.go:25
↓ 20 callers
Method
buildRunArgs
buildRunArgs assembles the container run flags for a skill invocation. Returns the args up to and including the image name; the caller appends the in-
internal/worker/container.go:361
↓ 19 callers
Function
firstNonEmpty
(vals ...string)
internal/web/server.go:818
↓ 18 callers
Method
Concurrency
Concurrency reports the parallelism limit the runner is currently using.
internal/queue/queue.go:79
↓ 18 callers
Function
newTestDB
(t *testing.T)
internal/db/finding_helpers_test.go:14
↓ 18 callers
Function
writeFileAt
writeFileAt writes contents to a slash-separated path relative to dir, creating intermediate directories. Used for the ruby-ext markers, which live un
internal/worker/profile_test.go:100
↓ 17 callers
Function
apiReq
(t *testing.T, s *Server, method, path, token, body string)
internal/web/api_finding_writes_test.go:35
↓ 17 callers
Function
runSkillWithFinding
(t *testing.T, outputKind, report string, startStatus db.FindingLifecycle)
internal/worker/skill_parsers_test.go:418
↓ 17 callers
Function
seedFinding
(t *testing.T, gdb *gorm.DB)
internal/db/finding_helpers_test.go:23
↓ 16 callers
Method
scanWorkRoot
scanWorkRoot is workRoot resolved through the resume lineage.
internal/worker/worker.go:349
↓ 15 callers
Function
AddFindingReview
AddFindingReview records one structured human verdict on a finding. verdict must be one of the values in ValidReviewVerdicts; the helper rejects free-
internal/db/audit.go:28
↓ 15 callers
Function
Load
Load reads a YAML config from path. Returns (nil, nil) when the file does not exist and the caller passed "" or DefaultPath — making config fully opt-
internal/config/config.go:214
↓ 15 callers
Function
seedFindings
(t *testing.T, s *Server)
internal/web/api_export_test.go:22
↓ 15 callers
Function
write
(t *testing.T, content string)
internal/config/config_test.go:10
↓ 14 callers
Function
AddFindingNote
AddFindingNote appends a timestamped note.
internal/db/finding_helpers.go:295
↓ 14 callers
Function
SettingInt
SettingInt returns the stored value parsed as an int, or 0 when the key is absent or unparseable. Callers treat 0 as "not configured".
internal/db/settings.go:51
↓ 14 callers
Function
ValidateReportSchema
ValidateReportSchema compiles schemaJSON and validates report against it. Returns "" when valid, otherwise a one-line-per-failure summary capped at ma
internal/worker/schema_validate.go:35
↓ 14 callers
Function
escapeMD
(s string)
internal/web/repo_report.go:726
↓ 14 callers
Function
getRepoPage
(t *testing.T, s *Server, id uint)
internal/web/repo_show_test.go:31
↓ 14 callers
Function
writeMarkerFile
(t *testing.T, dir, name string)
internal/worker/profile_test.go:88
↓ 13 callers
Function
RepoCacheRoot
RepoCacheRoot returns the persistent per-URL clone directory under dataDir. The cache survives scan cleanup so subsequent scans only fetch the delta;
internal/worker/repo_cache.go:22
↓ 13 callers
Function
findingsScanIDs
findingsScanIDs returns a GORM subquery selecting scan IDs that belong to the curated LLM audits (security-deep-dive, vuln-scan), to legacy/empty skil
internal/web/server.go:1186
↓ 13 callers
Method
recordRateLimit
recordRateLimit stores the latest rate-limit status for its window type and, when the overage fallback is enabled, logs the transition into or out of
internal/worker/worker.go:185
↓ 13 callers
Function
runSkillWithReport
runSkillWithReport wires a fakeRunner that returns the given report, runs one skill scan against a fresh DB, and returns the scanned Repository and th
internal/worker/skill_parsers_test.go:140
↓ 12 callers
Function
Parse
Parse sniffs data, picks a parser, and returns one Result per repository-scoped batch.
internal/ingest/ingest.go:121
↓ 12 callers
Function
SetSetting
SetSetting upserts key to value. SQLite has no UPDATE-or-INSERT in GORM's Save for a string primary key, so it goes through an ON CONFLICT clause.
internal/db/settings.go:42
↓ 12 callers
Method
SkillDir
SkillDir is the directory under workRoot where stageSkill writes SKILL.md, schema.json, and the skill's auxiliary files so this harness's own discover
internal/worker/harness.go:42
↓ 12 callers
Function
accountPauseReason
(resetAt *time.Time)
internal/worker/worker.go:666
↓ 12 callers
Function
buildClaudeArgs
buildClaudeArgs assembles the `claude -p` argv shared by the local and container runners. When the skill declares an allowed-tools list the agent is h
internal/worker/claude.go:271
↓ 12 callers
Function
flashFrom
(t *testing.T, w *httptest.ResponseRecorder)
internal/web/server_test.go:297
↓ 12 callers
Function
mustRun
(t *testing.T, dir string, args ...string)
internal/skills/git_test.go:78
↓ 11 callers
Method
ExtraLocationCount
ExtraLocationCount is the number of grouped match positions beyond the primary one shown in Location. Used by table views to render a "+N" badge witho
internal/db/db.go:693
↓ 11 callers
Method
dialTarget
dialTarget resolves a request's host:port to the address the proxy actually dials. A request to an API host (HostGatewayAlias by default) is rewritten
internal/worker/egress.go:354
↓ 11 callers
Function
postImport
(t *testing.T, s *Server, path, body string)
internal/web/ingest_import_test.go:14
↓ 11 callers
Method
preflightSkill
preflightSkill checks the skill's declared prereqs and decides what to do with the scan. Returns (deferred, err): deferred=true means the caller shoul
internal/worker/preflight.go:41
↓ 11 callers
Function
readJSONL
(t *testing.T, body string)
internal/web/api_export_test.go:40
↓ 11 callers
Method
scanOwnsRepo
scanOwnsRepo enforces the rule that a scan's API token only grants access to the repository it was issued against.
internal/web/api.go:82
↓ 10 callers
Function
PathIncluded
PathIncluded reports whether a file at rel (forward-slash, relative to workRoot/src) is visible to a skill with the given filters. When paths is non-e
internal/skills/filter.go:68
↓ 10 callers
Method
ResetTime
ResetTime converts the epoch-seconds resetsAt into a UTC time, or nil when the event carried no usable reset (nil receiver or non-positive timestamp).
internal/worker/stream.go:49
↓ 10 callers
Function
containsEnvFlag
containsEnvFlag reports whether the docker/podman argv s carries the pair `-e entry`. Adjacency matters: `-e A -e B` must not match `-e B A`.
internal/worker/harness_test.go:278
↓ 10 callers
Function
ecosystemKey
ecosystemKey derives the (type, namespace, name) join key for a row. The PURL is authoritative; when absent the key is rebuilt by constructing the PUR
internal/db/ecosystem.go:91
↓ 10 callers
Method
findingScoped
findingScoped parses the path id, resolves its repository, and enforces the scan-owns-repo auth rule. Returns false when the response has already been
internal/web/api_finding_writes.go:176
↓ 10 callers
Function
flagValue
(args []string, flag string)
internal/worker/claude_test.go:313
↓ 10 callers
Method
harness
harness returns the agent CLI to exec inside the container, defaulting to claude-code when none is set so the zero ContainerRunner{} keeps its histori
internal/worker/container.go:586
↓ 10 callers
Method
merge
merge layers cfg underneath f: a config value applies only when the matching CLI flag was not set explicitly. Also pushes the model pick list and them
cmd/scrutineer/main.go:172
↓ 10 callers
Function
newPreflightWorker
(t *testing.T)
internal/worker/preflight_test.go:15
↓ 10 callers
Function
seedPreflightFixtures
(t *testing.T, w *Worker, requires string)
internal/worker/preflight_test.go:42
↓ 10 callers
Function
seedPrereqScan
(t *testing.T, w *Worker, s *db.Skill, repoID uint, status db.ScanStatus)
internal/worker/preflight_test.go:81
↓ 10 callers
Function
validateFixSetup
validateFixSetup builds a repo with an active deep-dive and verify skill, a done baseline deep-dive scan, and two findings under it — the starting sta
internal/web/validate_fix_enqueue_test.go:28
↓ 9 callers
Method
DefaultModel
DefaultModel is the model id a tier falls back to when no tier-specific setting is configured. The runtime override wins; otherwise the first entry in
internal/web/models.go:78
↓ 9 callers
Method
SetDefaultEffort
SetDefaultEffort pins the effort applied to new scans. No-op for an empty or unknown value so a bad config or form post leaves the current default. Se
internal/web/efforts.go:30
↓ 9 callers
Method
ToModel
ToModel converts a Parsed to a Skill DB row with Source pre-filled. Version is left at zero; the caller bumps it relative to any existing row.
internal/skills/parse.go:447
↓ 9 callers
Function
applyPathFilters
applyPathFilters prunes workRoot/src down to the files visible to the skill given its scrutineer.paths / scrutineer.ignore_paths. This is a scoping me
internal/worker/skill.go:832
↓ 9 callers
Method
createOrTriageRepo
createOrTriageRepo is the shared path for both single-add and bulk-add. It FirstOrCreates the Repository row and, when the row is new and triage is tr
internal/web/server.go:1766
↓ 9 callers
Function
gatePatch
gatePatch returns "" when the diff is acceptable, otherwise a one-line reason. Checks: diff parses; every target file exists under srcDir; the diff to
internal/worker/patch_gate.go:74
↓ 9 callers
Function
postOrgImport
(t *testing.T, s *Server, form url.Values)
internal/web/org_import_test.go:26
↓ 9 callers
Function
quietLog
()
internal/worker/egress_test.go:19
↓ 9 callers
Method
runArgs
runArgs starts a runtime `run` command, adding runtime-specific flags that must precede the common options. Apple's container CLI writes lifecycle pro
internal/worker/runtime.go:146
↓ 8 callers
Method
DefaultEffort
DefaultEffort is the effort a new scan inherits when the caller pins none. The runtime override wins; otherwise the built-in default.
internal/web/efforts.go:41
↓ 8 callers
Function
HostAllowed
HostAllowed reports whether host matches any entry in allow. Matching is case-insensitive on the bare hostname (port already stripped). An entry "*.ex
internal/worker/egress.go:270
↓ 8 callers
Method
LocationList
LocationList splits the Locations column into its file:line entries. Returns nil for single-location findings (Locations empty), so templates can rang
internal/db/db.go:679
↓ 8 callers
Function
ParseRepoInput
ParseRepoInput accepts the three user-facing shapes: https://github.com/owner/repo[.git] https://github.com/owner/repo/tree/<branch>/<path...> htt
internal/web/parse_repo_url.go:56
↓ 8 callers
Function
ParseStream
ParseStream reads claude --output-format stream-json lines from r and calls emit for each event. Lines that fail to decode are passed through as text
internal/worker/stream.go:112
↓ 8 callers
Function
ValidModelTier
(tier string)
internal/web/models.go:96
↓ 8 callers
Method
autoChainVerifyAfterRevalidate
autoChainVerifyAfterRevalidate is wired onto Worker.OnRevalidateVerdict. The cheap revalidate pass acts as the gate for the expensive verify step: a f
internal/web/revalidate_enqueue.go:113
↓ 8 callers
Method
computeVID
computeVID shells out to the vid CLI (github.com/andrew/VID) to hash the code at the finding's sink locations into a portable identifier. Returns "" w
internal/worker/vid.go:68
next →
1–100 of 2,165, ranked by callers