MCPcopy Create free account

hub / github.com/alpha-omega-security/scrutineer / functions

Functions2,165 in github.com/alpha-omega-security/scrutineer

↓ 3 callersFunctionnewTestQueue
(t *testing.T, concurrency int)
internal/queue/queue_test.go:15
↓ 3 callersFunctionnormaliseThreatModel
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 callersMethodonOverageLocked
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 callersFunctionparseAppleStatus
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 callersMethodparseBreakingChangeOutput
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 callersMethodparseDependenciesOutput
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 callersMethodparseFindingDedupOutput
(scan *db.Scan, report string, emit func(Event))
internal/worker/skill_parsers.go:1007
↓ 3 callersFunctionparseMajorMinor
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 callersFunctionparseMaxTurns
(s string)
internal/web/skills_handlers.go:150
↓ 3 callersMethodparseMitigationOutput
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 callersMethodparsePostureOutput
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 callersFunctionparseProxySidecarNames
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 callersFunctionparseRemoteHeads
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 callersFunctionparseSkillModel
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 callersMethodparseSubprojectsOutput
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 callersFunctionparseToolVersions
(out string)
internal/worker/versions.go:140
↓ 3 callersFunctionpathUnderRoot
(path, root string)
internal/worker/skill_parsers.go:433
↓ 3 callersFunctionpercentile
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 callersFunctionprettyJSON
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 callersMethodpublish
(scanID, repoID uint, name, data string)
internal/worker/worker.go:313
↓ 3 callersFunctionreadArchive
readArchive uncompresses a tar.gz response body and returns a map of filename -> content.
internal/web/finding_bundle_test.go:20
↓ 3 callersFunctionreadProbe
(t *testing.T, path string)
cmd/scrutineer/backup_test.go:35
↓ 3 callersFunctionrealPathUnderRoot
(path, root string)
internal/worker/skill_parsers.go:438
↓ 3 callersFunctionregisterFlags
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 callersFunctionrenderRepoReport
(gdb *gorm.DB, repo *db.Repository, audience reportAudience)
internal/web/repo_report.go:60
↓ 3 callersMethodrepoFormError
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 callersMethodresolveSBOMPackages
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 callersFunctionresumeOpts
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 callersFunctionrunScan
(t *testing.T, w *Worker, scanID uint)
internal/worker/worker_resume_test.go:57
↓ 3 callersFunctionsafeURL
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 callersFunctionsanitizeBlobPath
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 callersFunctionseedPrereqSkillAndDoneScan
(t *testing.T, w *Worker, repoID uint, prereq string)
internal/worker/preflight_test.go:95
↓ 3 callersFunctionseedRepoWithReport
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 callersFunctionskillOutputFile
(skill *db.Skill)
internal/worker/skill.go:276
↓ 3 callersFunctionsortRows
(rows []DiffRow)
internal/web/threat_workbench.go:305
↓ 3 callersFunctionsplitFileLine
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 callersFunctionstageImportPayload
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 callersMethodsupportsHostGatewayAddHost
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 callersMethodsupportsPullNever
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 callersFunctiontestGitEnv
()
internal/web/git_testenv_test.go:5
↓ 3 callersFunctiontoValidationFindings
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 callersMethodusesEgressSidecar
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 callersFunctionvalidateExportFormat
(w http.ResponseWriter, r *http.Request)
internal/web/api_export.go:347
↓ 3 callersFunctionwaitChan
(t *testing.T, ch <-chan struct{}, msg string)
internal/queue/queue_test.go:134
↓ 3 callersFunctionwalkMarkerPresentBounded
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 callersFunctionwithGitHubAPI
withGitHubAPI points the fetcher at a test server for the duration of a test.
internal/web/org_import_test.go:321
↓ 3 callersFunctionwriteSetupPy
(t *testing.T, dir, contents string)
internal/worker/profile_test.go:79
↓ 2 callersMethodAccountErrorText
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 callersMethodArgs
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 callersFunctionBackfillFindingRepository
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 callersMethodBinary
()
internal/worker/harness.go:86
↓ 2 callersFunctionCloneOrPull
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 callersMethodClosed
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 callersFunctionConfidenceAtLeast
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 callersFunctionDetectRuntime
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 callersFunctionDirAllExcluded
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 callersMethodEgressHosts
()
internal/worker/harness.go:102
↓ 2 callersFunctionEgressSidecarEnv
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 callersMethodEmpty
()
internal/web/threat_workbench.go:63
↓ 2 callersFunctionFormatEvent
FormatEvent renders an Event as one log line.
internal/worker/stream.go:246
↓ 2 callersMethodGuideFilename
()
internal/worker/harness.go:100
↓ 2 callersMethodHardeningSupportError
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 callersMethodHostLoopbackBackendLikely
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 callersFunctionIsNamedProfile
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 callersFunctionKnownProfile
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 callersMethodNeedsEgressSidecar
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 callersFunctionNew
(gdb *gorm.DB, q *queue.Queue, log *slog.Logger, broker *Broker, w *worker.Worker)
internal/web/server.go:170
↓ 2 callersFunctionNewBroker
()
internal/web/sse.go:40
↓ 2 callersFunctionParseRepoSpec
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 callersMethodParseStream
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 callersMethodPublish
Publish sends an event to all matching clients. Non-blocking: slow clients get their channel drained.
internal/web/sse.go:64
↓ 2 callersFunctionRefreshEcosystems
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 callersMethodRejected
()
internal/worker/stream.go:57
↓ 2 callersFunctionRunnerImageStaleness
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 callersFunctionRuntimeOf
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 callersFunctionRuntimeServerVersion
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 callersFunctionServeEgressProxy
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 callersMethodSetRunnerImageStatus
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 callersFunctionStartEgressProxy
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 callersMethodStateEnv
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 callersMethodTerminal
()
internal/db/db.go:1029
↓ 2 callersFunctionValidModelPreference
(value string)
internal/web/models.go:105
↓ 2 callersFunctionValidateClone
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 callersFunctionValidateSELinux
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 callersMethodaddRepoAndScan
(w http.ResponseWriter, r *http.Request, repoURL string)
internal/web/server.go:1204
↓ 2 callersMethodallEcosystems
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 callersMethodapiAuth
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 callersFunctionapplyClass
()
internal/web/static/theme-init.js:9
↓ 2 callersFunctionapplyHljs
()
internal/web/static/theme-init.js:16
↓ 2 callersFunctionapplyOverageDowngrade
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 callersMethodapplyResume
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 callersFunctionassertProfileChainAcyclic
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 callersFunctionbaseURLHost
(raw string)
cmd/scrutineer/main.go:839
↓ 2 callersFunctionbrakemanVersion
(t *testing.T, dockerfile string)
internal/worker/profile_test.go:937
↓ 2 callersFunctionbuildCSAF
(f db.Finding, repo db.Repository, refs []db.FindingReference, pkgs []db.Package, fdRows []db.FindingDependent
internal/web/finding_csaf.go:308
↓ 2 callersFunctionbuildOSV
(f db.Finding, repo db.Repository, refs []db.FindingReference, pkgs []db.Package)
internal/web/finding_osv.go:180
↓ 2 callersFunctionbuildResumePrompt
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 callersFunctionbulkToastCategory
(created int, invalid []string)
internal/web/server.go:1827
↓ 2 callersFunctionbulkToastDescription
(invalid []string)
internal/web/server.go:1848
↓ 2 callersMethodcancelScan
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
← previousnext →401–500 of 2,165, ranked by callers