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
↓ 3 callers
Function
newTestQueue
(t *testing.T, concurrency int)
internal/queue/queue_test.go:15
↓ 3 callers
Function
normaliseThreatModel
normaliseThreatModel checks the input parses as JSON and re-emits it indented so the editor round-trips cleanly. Empty input is allowed (it clears the
internal/web/threat_workbench.go:176
↓ 3 callers
Method
onOverageLocked
onOverageLocked reports whether any tracked window is currently on overage (past the included quota) with an unexpired reset, or with no reset timesta
internal/worker/worker.go:225
↓ 3 callers
Function
parseAppleStatus
parseAppleStatus extracts the apiserver version from `container system status` output. The runtime identity is "apple"; this parses the Apple CLI outp
internal/worker/runtime.go:245
↓ 3 callers
Method
parseBreakingChangeOutput
parseBreakingChangeOutput records the breaking-change verdict on a finding from a static analysis of the suggested-fix diff. The verdict goes into Fin
internal/worker/skill_parsers.go:664
↓ 3 callers
Method
parseDependenciesOutput
parseDependenciesOutput replaces Dependency rows for the scan's repository. Dependencies come from a git-pkgs-style manifest scan: one row per (name,
internal/worker/skill_parsers.go:232
↓ 3 callers
Method
parseFindingDedupOutput
(scan *db.Scan, report string, emit func(Event))
internal/worker/skill_parsers.go:1007
↓ 3 callers
Function
parseMajorMinor
parseMajorMinor pulls the leading major and minor integers out of a dotted version string ("4.9.4" -> 4, 9). ok is false when either is absent or non-
internal/worker/runtime.go:310
↓ 3 callers
Function
parseMaxTurns
(s string)
internal/web/skills_handlers.go:150
↓ 3 callers
Method
parseMitigationOutput
parseMitigationOutput stores the operational mitigation guidance and the optional semgrep rule the mitigate skill emits. Both go to the finding throug
internal/worker/skill_parsers.go:739
↓ 3 callers
Method
parsePostureOutput
parsePostureOutput writes the disclosure-readiness tier and summary onto the Repository row. The full check list stays in scan.Report; only the tier a
internal/worker/skill_parsers.go:562
↓ 3 callers
Function
parseProxySidecarNames
parseProxySidecarNames extracts strict-prefix matches from the runtime's `ps --format {{.Names}}`. Its --filter name= is a substring match, so we re-c
internal/worker/container.go:1249
↓ 3 callers
Function
parseRemoteHeads
parseRemoteHeads extracts branch names from `git ls-remote --heads` output (lines of "<sha>\trefs/heads/<name>"), sorted and de-duplicated.
internal/worker/clone.go:205
↓ 3 callers
Function
parseSkillModel
parseSkillModel keeps the form value only if it's a configured model ID or model tier. Anything else is silently dropped so the scan falls back to the
internal/web/skills_handlers.go:161
↓ 3 callers
Method
parseSubprojectsOutput
parseSubprojectsOutput replaces Subproject rows for the scan's repository. Subprojects are a projection of the repo layout produced by the subprojects
internal/worker/skill_parsers.go:457
↓ 3 callers
Function
parseToolVersions
(out string)
internal/worker/versions.go:140
↓ 3 callers
Function
pathUnderRoot
(path, root string)
internal/worker/skill_parsers.go:433
↓ 3 callers
Function
percentile
percentile returns the p-th percentile (0..1) of a sorted slice using linear interpolation between the two nearest ranks (the same method numpy uses b
internal/web/usage.go:153
↓ 3 callers
Function
prettyJSON
prettyJSON re-indents raw if it parses as JSON, otherwise returns it unchanged so non-JSON reports (markdown, plain text) pass through.
internal/web/jsontree.go:15
↓ 3 callers
Method
publish
(scanID, repoID uint, name, data string)
internal/worker/worker.go:313
↓ 3 callers
Function
readArchive
readArchive uncompresses a tar.gz response body and returns a map of filename -> content.
internal/web/finding_bundle_test.go:20
↓ 3 callers
Function
readProbe
(t *testing.T, path string)
cmd/scrutineer/backup_test.go:35
↓ 3 callers
Function
realPathUnderRoot
(path, root string)
internal/worker/skill_parsers.go:438
↓ 3 callers
Function
registerFlags
registerFlags binds every CLI flag onto fs. Split out of parseFlags so a test can parse a synthetic argv against a throwaway FlagSet -- in particular
cmd/scrutineer/main.go:136
↓ 3 callers
Function
renderRepoReport
(gdb *gorm.DB, repo *db.Repository, audience reportAudience)
internal/web/repo_report.go:60
↓ 3 callers
Method
repoFormError
repoFormError renders an inline error for a failed add-repo-style submission. For htmx requests it swaps the named OOB alert template (each dialog has
internal/web/server.go:1676
↓ 3 callers
Method
resolveSBOMPackages
resolveSBOMPackages walks every unresolved package in the upload, looks up its source repository via packages.ecosyste.ms, FirstOrCreates the repo, en
internal/web/sboms.go:252
↓ 3 callers
Function
resumeOpts
resumeOpts decides whether a retry of scan should resume its claude session. Failed scans and soft-success scans that hit max turns are resumable when
internal/web/scans.go:166
↓ 3 callers
Function
runScan
(t *testing.T, w *Worker, scanID uint)
internal/worker/worker_resume_test.go:57
↓ 3 callers
Function
safeURL
safeURL returns u trimmed when it carries an http or https scheme, else empty. Applied to model-emitted URLs (html_url, icon_url) before they reach th
internal/worker/skill_parsers.go:91
↓ 3 callers
Function
sanitizeBlobPath
sanitizeBlobPath rejects absolute paths, traversal segments and NUL bytes, and returns the slash-form path safe to feed `git show <commit>:<path>`.
internal/web/code_browser.go:107
↓ 3 callers
Function
seedPrereqSkillAndDoneScan
(t *testing.T, w *Worker, repoID uint, prereq string)
internal/worker/preflight_test.go:95
↓ 3 callers
Function
seedRepoWithReport
seedRepoWithReport creates a repo with a completed security-deep-dive scan, a finding carrying six-step prose, snippet, disclosure draft, suggested fi
internal/web/repo_report_test.go:19
↓ 3 callers
Function
skillOutputFile
(skill *db.Skill)
internal/worker/skill.go:276
↓ 3 callers
Function
sortRows
(rows []DiffRow)
internal/web/threat_workbench.go:305
↓ 3 callers
Function
splitFileLine
splitFileLine splits a "path:line" location string. LastIndex handles Windows-style paths that contain colons; an unparseable line number degrades to
internal/web/repo_report.go:798
↓ 3 callers
Function
stageImportPayload
stageImportPayload writes the raw report bytes from an import-fallback run into the workspace at import/report, where the ingest skill expects to find
internal/worker/skill.go:1026
↓ 3 callers
Method
supportsHostGatewayAddHost
supportsHostGatewayAddHost reports whether the runtime accepts Docker's `--add-host name:host-gateway` marker. Apple's container CLI does not expose t
internal/worker/runtime.go:102
↓ 3 callers
Method
supportsPullNever
supportsPullNever reports whether `run --pull never` is supported. Apple's container CLI does not expose a pull policy flag, so callers that need a no
internal/worker/runtime.go:109
↓ 3 callers
Function
testGitEnv
()
internal/web/git_testenv_test.go:5
↓ 3 callers
Function
toValidationFindings
toValidationFindings projects findings onto the report shape and sorts them deterministically (severity high to low, then fingerprint) so the emitted
internal/web/validate_fix.go:109
↓ 3 callers
Method
usesEgressSidecar
usesEgressSidecar reports whether this scan routes egress through a proxy sidecar container instead of the in-process host proxy. True only for rootle
internal/worker/container.go:157
↓ 3 callers
Function
validateExportFormat
(w http.ResponseWriter, r *http.Request)
internal/web/api_export.go:347
↓ 3 callers
Function
waitChan
(t *testing.T, ch <-chan struct{}, msg string)
internal/queue/queue_test.go:134
↓ 3 callers
Function
walkMarkerPresentBounded
walkMarkerPresentBounded is walkMarkerPresent with the depth and file bounds injected, so both caps are unit-testable without materialising a markerWa
internal/worker/profile.go:393
↓ 3 callers
Function
withGitHubAPI
withGitHubAPI points the fetcher at a test server for the duration of a test.
internal/web/org_import_test.go:321
↓ 3 callers
Function
writeSetupPy
(t *testing.T, dir, contents string)
internal/worker/profile_test.go:79
↓ 2 callers
Method
AccountErrorText
AccountErrorText returns s when it looks like an account-level failure from the harness's provider (a usage/rate/plan limit, or access disabled/revoke
internal/worker/harness.go:76
↓ 2 callers
Method
Args
Args is the argv (without the binary) for one skill run. effort is the runner's configured default; globalMaxTurns is the runner's -max-turns flag. Pe
internal/worker/harness.go:27
↓ 2 callers
Function
BackfillFindingRepository
BackfillFindingRepository copies Scan.RepositoryID onto Finding rows whose RepositoryID column is still zero. Used on first boot after adding the deno
internal/db/db.go:1244
↓ 2 callers
Method
Binary
()
internal/worker/harness.go:86
↓ 2 callers
Function
CloneOrPull
CloneOrPull prepares a local copy of a git repo at dst. On first call it clones; on subsequent calls it fetches and resets to the requested ref so ski
internal/skills/git.go:63
↓ 2 callers
Method
Closed
Closed reports whether the lifecycle is terminal or hidden-by-default (fixed, published, rejected, duplicate) — a finding no longer in the active tria
internal/db/db.go:367
↓ 2 callers
Function
ConfidenceAtLeast
ConfidenceAtLeast reports whether got ranks at or above min on the low/medium/high scale. A finding without a confidence value is dropped when a min_c
internal/db/finding_helpers.go:211
↓ 2 callers
Function
DetectRuntime
DetectRuntime resolves the operator's --runtime choice into a ContainerRuntime, verifying the engine is actually reachable. prefer is "docker" (or ""
internal/worker/runtime.go:182
↓ 2 callers
Function
DirAllExcluded
DirAllExcluded reports whether every file under directory rel is excluded by the configured filters — i.e. the workspace pruner can safely RemoveAll/S
internal/skills/filter.go:37
↓ 2 callers
Method
EgressHosts
()
internal/worker/harness.go:102
↓ 2 callers
Function
EgressSidecarEnv
EgressSidecarEnv returns the SCRUTINEER_PROXY_* environment assignments the container runner injects into the egress proxy sidecar. It is the single s
internal/worker/container.go:922
↓ 2 callers
Method
Empty
()
internal/web/threat_workbench.go:63
↓ 2 callers
Function
FormatEvent
FormatEvent renders an Event as one log line.
internal/worker/stream.go:246
↓ 2 callers
Method
GuideFilename
()
internal/worker/harness.go:100
↓ 2 callers
Method
HardeningSupportError
HardeningSupportError reports why the runtime cannot honour the requested hardening mode, or nil when it can. Apple's container runtime supports --har
internal/worker/runtime.go:133
↓ 2 callers
Method
HostLoopbackBackendLikely
HostLoopbackBackendLikely reports whether the detected podman is recent enough to default to a backend (pasta >= 5.0) that forwards host-gateway to th
internal/worker/runtime.go:343
↓ 2 callers
Function
IsNamedProfile
IsNamedProfile reports whether name is a registered profile, excluding the default (which is the *absence* of a profile and cannot be the target of `r
internal/worker/profile.go:261
↓ 2 callers
Function
KnownProfile
KnownProfile reports whether name is an acceptable `?profile=` value: empty, "default", or a registered named profile. Use this to validate operator-s
internal/worker/profile.go:251
↓ 2 callers
Method
NeedsEgressSidecar
NeedsEgressSidecar is the exported form of needsEgressSidecar. The startup path uses it to decide whether a hardened run sets up a per-scan egress pro
internal/worker/runtime.go:159
↓ 2 callers
Function
New
(gdb *gorm.DB, q *queue.Queue, log *slog.Logger, broker *Broker, w *worker.Worker)
internal/web/server.go:170
↓ 2 callers
Function
NewBroker
()
internal/web/sse.go:40
↓ 2 callers
Function
ParseRepoSpec
ParseRepoSpec splits a skills_repo spec into a clone URL and an optional git ref. Two forms are accepted: owner/repo[@ref] — shorthan
internal/skills/git.go:25
↓ 2 callers
Method
ParseStream
ParseStream reads the harness's combined stdout/stderr and emits one Event per logical line. The Event vocabulary (KindText, KindTool, KindSession, Ki
internal/worker/harness.go:33
↓ 2 callers
Method
Publish
Publish sends an event to all matching clients. Non-blocking: slow clients get their channel drained.
internal/web/sse.go:64
↓ 2 callers
Function
RefreshEcosystems
RefreshEcosystems pre-fetches and caches the ecosyste.ms payloads for one repository. With staleOnly true, only sources past their TTL are re-fetched,
internal/worker/ecosystems.go:94
↓ 2 callers
Method
Rejected
()
internal/worker/stream.go:57
↓ 2 callers
Function
RunnerImageStaleness
RunnerImageStaleness compares the locally pulled runner image against the :latest manifest in the registry and reports whether it is stale: a newer di
internal/worker/staleness.go:53
↓ 2 callers
Function
RuntimeOf
RuntimeOf returns the container runtime the given runner uses, or the docker zero value when the runner is not container-backed (LocalClaude under --n
internal/worker/versions.go:24
↓ 2 callers
Function
RuntimeServerVersion
RuntimeServerVersion returns a human-readable engine version for the settings page, e.g. "docker 24.0.7", "podman 4.9.4", or "Apple container 1.0.0",
internal/worker/versions.go:38
↓ 2 callers
Function
ServeEgressProxy
ServeEgressProxy runs p on addr and blocks until the server stops. The egress proxy sidecar uses it to listen on a fixed port inside its container; th
internal/worker/egress.go:375
↓ 2 callers
Method
SetRunnerImageStatus
SetRunnerImageStatus records the boot-time runner-image staleness result so the settings page can surface it. Called once from main after the backgrou
internal/web/server.go:138
↓ 2 callers
Function
StartEgressProxy
StartEgressProxy listens on all interfaces on an ephemeral port and serves p in a goroutine. It returns the chosen port. The caller embeds the port an
internal/worker/egress.go:290
↓ 2 callers
Method
StateEnv
StateEnv returns the env entries (KEY=VALUE) that point the harness at containerPath as its persistent state/config directory. The runner bind-mounts
internal/worker/harness.go:68
↓ 2 callers
Method
Terminal
()
internal/db/db.go:1029
↓ 2 callers
Function
ValidModelPreference
(value string)
internal/web/models.go:105
↓ 2 callers
Function
ValidateClone
ValidateClone returns an error when s is neither empty, "shallow", nor "full". Exposed so the CLI flag can use the same rule as the YAML field.
internal/config/config.go:144
↓ 2 callers
Function
ValidateSELinux
ValidateSELinux returns an error when s is not one of "", "auto", "on", or "off". Exposed so the CLI flag can use the same rule as the YAML field.
internal/config/config.go:167
↓ 2 callers
Method
addRepoAndScan
(w http.ResponseWriter, r *http.Request, repoURL string)
internal/web/server.go:1204
↓ 2 callers
Method
allEcosystems
allEcosystems returns every brief package-manager name the profile matches: the singular Ecosystem (if set) plus any in Ecosystems.
internal/worker/profile.go:105
↓ 2 callers
Method
apiAuth
apiAuth validates bearer tokens against the currently running scan rows and puts the scan on the request context so handlers can apply the "skills onl
internal/web/api.go:39
↓ 2 callers
Function
applyClass
()
internal/web/static/theme-init.js:9
↓ 2 callers
Function
applyHljs
()
internal/web/static/theme-init.js:16
↓ 2 callers
Function
applyOverageDowngrade
applyOverageDowngrade rewrites an expensive tier preference to mid when the overage fallback is active; otherwise it returns the preference unchanged.
internal/web/models.go:207
↓ 2 callers
Method
applyResume
applyResume fills a SkillJob's session-resume inputs from the scan: the claude session id to --resume (set on a retry that carries one forward from a
internal/worker/worker.go:387
↓ 2 callers
Function
assertProfileChainAcyclic
assertProfileChainAcyclic walks the chain reached by next() from every registered profile and fails if a name repeats. A FallbackProfile cycle would s
internal/worker/profile_test.go:845
↓ 2 callers
Function
baseURLHost
(raw string)
cmd/scrutineer/main.go:839
↓ 2 callers
Function
brakemanVersion
(t *testing.T, dockerfile string)
internal/worker/profile_test.go:937
↓ 2 callers
Function
buildCSAF
(f db.Finding, repo db.Repository, refs []db.FindingReference, pkgs []db.Package, fdRows []db.FindingDependent
internal/web/finding_csaf.go:308
↓ 2 callers
Function
buildOSV
(f db.Finding, repo db.Repository, refs []db.FindingReference, pkgs []db.Package)
internal/web/finding_osv.go:180
↓ 2 callers
Function
buildResumePrompt
buildResumePrompt is the nudge handed to a `--resume`d run. The prior turns are already in context, so this just tells the agent to carry on and resta
internal/worker/claude.go:365
↓ 2 callers
Function
bulkToastCategory
(created int, invalid []string)
internal/web/server.go:1827
↓ 2 callers
Function
bulkToastDescription
(invalid []string)
internal/web/server.go:1848
↓ 2 callers
Method
cancelScan
cancelScan aborts one non-terminal scan. A running scan is signalled through the worker, which flips its row and publishes scan-status as it unwinds;
internal/web/scans.go:415
← previous
next →
401–500 of 2,165, ranked by callers