MCPcopy Create free account

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

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

↓ 5 callersMethodautoComputeFixValidation
autoComputeFixValidation is the anchor half of onScanFinalized. For a scan marked with BaselineScanID it diffs the baseline scan's findings against th
internal/web/validate_fix_enqueue.go:170
↓ 5 callersMethodautoEnqueueRevalidate
verifySkillName is shared with server.go: the heavier reproduction-running checker chained after revalidate when a High/Critical finding is judged a t
internal/web/revalidate_enqueue.go:33
↓ 5 callersFunctionbuildEgressAllow
buildEgressAllow assembles the proxy allowlist: the harness's model-API hosts first, then the harness-neutral base. Hardened mode starts from Hardened
cmd/scrutineer/main.go:819
↓ 5 callersFunctionbuildSkillPrompt
buildSkillPrompt is the activation prompt handed to claude. It's a thin wrapper: the skill's SKILL.md holds the actual instructions, we just tell clau
internal/worker/claude.go:329
↓ 5 callersFunctionbuiltinModelForTier
(tier, fallback string)
internal/web/models.go:149
↓ 5 callersMethodcheckHardenedWorkspace
checkHardenedWorkspace returns an error when a hardening mode is on and the cloned workspace exceeds HardenedWorkspaceCapBytes. It applies under both
internal/worker/container.go:538
↓ 5 callersFunctionclassifyScope
classifyScope derives direct-vs-transitive from the SBOM's relationship graph. Roots are nodes that originate DEPENDS_ON edges but are never themselve
internal/web/sboms.go:295
↓ 5 callersFunctioncontainsSubstr
(events []string, sub string)
internal/worker/patch_gate_test.go:384
↓ 5 callersFunctioncopyTree
copyTree recursively copies src to dst, preserving permissions but not ownership or timestamps. Symlinks are recreated; everything else is copied byte
internal/worker/exposure.go:67
↓ 5 callersFunctiondecodeJSON
decodeJSON unmarshals a recorded response body into out, failing the test with the body on error so a non-JSON response (e.g. an error page) shows up
internal/web/audit_test.go:47
↓ 5 callersFunctiondirSize
dirSize sums the on-disk size of every regular file under root. Used by hardened mode to refuse a scan whose workspace is large enough to fill the hos
internal/worker/container.go:694
↓ 5 callersFunctionensureClone
ensureClone returns the path to an up-to-date clone of repo.URL under the given work root. fullClone selects between --depth 1 (false, the default) an
internal/worker/clone.go:67
↓ 5 callersFunctionenvMap
envMap turns a map into a getenv-shaped lookup with "" for misses.
cmd/scrutineer/proxy_test.go:14
↓ 5 callersFunctiongateRepo
gateRepo creates a git repo under dir with one file pkg/foo.go containing numbered lines 1..20, edits line 12, captures a real `git diff`, then resets
internal/worker/patch_gate_test.go:137
↓ 5 callersFunctiongit
(ctx context.Context, dir string, args ...string)
internal/skills/git.go:114
↓ 5 callersFunctiongitHead
(dir string)
internal/worker/clone.go:224
↓ 5 callersMethodhardenedEgressBlockArgs
hardenedEgressBlockArgs builds the `run` args for probe (a): a container on the per-scan --internal network, no proxy env, that must fail to reach a r
internal/worker/container.go:1113
↓ 5 callersMethodinjectProfileGuide
injectProfileGuide copies the resolved profile's PROFILE.md into the workspace as CLAUDE.md so claude-code auto-loads it as project memory ahead of th
internal/worker/container.go:558
↓ 5 callersFunctionisHX
(r *http.Request)
internal/web/server.go:479
↓ 5 callersFunctionlistSlice
(m map[string]any, key string)
internal/web/repo_report.go:657
↓ 5 callersFunctionmakeProbeDB
(t *testing.T, path string)
cmd/scrutineer/backup_test.go:14
↓ 5 callersMethodneedsKeepID
needsKeepID reports whether `run` invocations must add --userns=keep-id to keep bind-mount writes owned by the invoking host user. True only for rootl
internal/worker/runtime.go:61
↓ 5 callersFunctionnewExposureWorker
(t *testing.T)
internal/worker/exposure_test.go:11
↓ 5 callersFunctionnewPatchOutputFixture
(t *testing.T)
internal/worker/patch_gate_test.go:230
↓ 5 callersFunctionnewSchemaTestWorker
(t *testing.T, strict bool)
internal/worker/schema_validate_test.go:86
↓ 5 callersFunctionosvAffectedKinds
osvAffectedKinds splits an OSV record's affected[] into the entries that carry a package and the entries that carry only ranges, so a test can assert
internal/web/finding_osv_test.go:24
↓ 5 callersFunctionparseHighlight
parseHighlight decodes `line=N` or `line=N-M` into an inclusive range. Returns (0, 0) when missing or malformed.
internal/web/code_browser.go:165
↓ 5 callersMethodparseRevalidateOutput
parseRevalidateOutput records the cheap classifier verdict for a finding. The verdict and reason become a FindingNote; an adjusted severity overwrites
internal/worker/skill_parsers.go:911
↓ 5 callersFunctionpostExploitedForm
postExploitedForm posts a form-encoded request to the exploitation handler, mimicking the browser form on the finding page.
internal/web/finding_exploited_test.go:15
↓ 5 callersFunctionpullOrSkip
(t *testing.T, rt ContainerRuntime, image string)
internal/worker/podman_integration_test.go:45
↓ 5 callersFunctionquietLog
()
cmd/scrutineer/main_test.go:280
↓ 5 callersFunctionreadCappedReport
readCappedReport returns the first maxReportBytes bytes of the file at path, or an empty string if the file doesn't exist. Oversize files are truncate
internal/worker/claude.go:246
↓ 5 callersFunctionrenderMarkdown
(src string)
internal/web/markdown.go:15
↓ 5 callersMethodrepoBlob
repoBlob reads one file via `git show <commit>:<path>` from the worker's repo-cache, so historical commits resolve even after rescans move HEAD.
internal/web/code_browser.go:34
↓ 5 callersFunctionresolveListen
resolveListen turns the SidecarListenFirstIface keyword in the listen host into the concrete IPv4 of the sidecar's first interface -- its per-scan --i
cmd/scrutineer/proxy.go:94
↓ 5 callersFunctionrunBackup
runBackup writes a consistent snapshot of data/scrutineer.db to -to (or a timestamped file in the working directory). It relies on VACUUM INTO, which
cmd/scrutineer/backup.go:48
↓ 5 callersMethodrunFindingSkill
(w http.ResponseWriter, r *http.Request, name string, skipOpen bool)
internal/web/server.go:1305
↓ 5 callersFunctionrunRestore
runRestore replaces data/scrutineer.db with the database at -from. It refuses to run while a server is reachable on the configured address and validat
cmd/scrutineer/backup.go:92
↓ 5 callersFunctionseedAuditFixture
seedAuditFixture creates a repo with a running scan (for the bearer token) and a Low-severity finding so it lands in the audit queue.
internal/web/audit_test.go:18
↓ 5 callersFunctionseedExposureFixtures
(t *testing.T, w *Worker)
internal/worker/exposure_test.go:20
↓ 5 callersFunctionseedFindingForAPI
seedFindingForAPI returns a finding plus the bearer token a skill running against the same repo would present. A second repo+scan provides a token tha
internal/web/api_finding_writes_test.go:17
↓ 5 callersFunctionseedScanWithSkill
seedScanWithSkill creates a repo + skill (with the given schema) + running scan whose APIToken authenticates and whose SkillID points at the skill, so
internal/web/api_test.go:558
↓ 5 callersFunctionseverityRank
(severity string)
internal/web/org_summary.go:134
↓ 5 callersFunctionshortCommit
(c string)
internal/web/repo_report.go:748
↓ 5 callersFunctiontestGitEnv
()
internal/worker/git_testenv_test.go:5
↓ 5 callersFunctionwithTestModels
(t *testing.T, models []Model)
internal/web/models_test.go:5
↓ 4 callersFunctionBaseScoreFromVector
BaseScoreFromVector computes the CVSS base score for a v3.0 or v3.1 vector. Returns (0, false) when the vector is empty or unparseable; callers should
internal/db/cvss.go:16
↓ 4 callersMethodCacheHitRatio
CacheHitRatio is the share of total input tokens served from the prompt cache. 0 when nothing has been recorded.
internal/db/db.go:964
↓ 4 callersFunctionDependencyFindings
DependencyFindings joins an application repository's Dependency rows against every Package row in the database (any repository) and returns the live F
internal/db/ecosystem.go:147
↓ 4 callersFunctionDependencyVisibleByDefault
DependencyVisibleByDefault reports whether a dependency should be treated as part of the shipped/runtime graph. Unknown values stay visible so new eco
internal/db/ecosystem.go:72
↓ 4 callersMethodEnsureCommit
EnsureCommit deepens the per-URL cache so commit becomes reachable. No-op when the commit is already present (the common case after the scan that reco
internal/worker/repo_cache.go:110
↓ 4 callersMethodError
()
internal/worker/clone.go:24
↓ 4 callersFunctionGetSetting
GetSetting returns the stored value for key and whether a row exists. It uses Find rather than First so a missing key is a clean (zero rows) result in
internal/db/settings.go:31
↓ 4 callersFunctionHostSELinuxState
HostSELinuxState reports the host's SELinux mode for the startup diagnostic, reading the selinuxfs status node: "enforcing" (enforce==1) or "permissiv
internal/worker/selinux.go:81
↓ 4 callersFunctionJoinPatterns
JoinPatterns serialises a slice of patterns into the newline form stored on db.Skill.
internal/skills/filter.go:159
↓ 4 callersFunctionProxyURLForHost
ProxyURLForHost builds the http_proxy-style URL for containers reaching the in-process host proxy. Docker/Podman pass HostGatewayAlias; Apple's contai
internal/worker/egress.go:315
↓ 4 callersMethodRegister
(name string, fn jobs.Func)
internal/queue/queue.go:83
↓ 4 callersMethodRegister
(q *queue.Queue)
internal/worker/worker.go:448
↓ 4 callersFunctionSetFindingLabels
SetFindingLabels replaces a finding's label set with the given names. Labels not already in the DB are created with a default (no color). Empty slice
internal/db/finding_helpers.go:349
↓ 4 callersFunctionValidateEffort
ValidateEffort returns an error when s is not a known effort level. Empty is valid (caller keeps the default). Exposed so the CLI flag can use the sam
internal/config/config.go:204
↓ 4 callersFunctionValidateRuntime
ValidateRuntime returns an error when s is neither empty, "docker", "podman", nor "apple". Exposed so the CLI flag can use the same rule as the YAML f
internal/config/config.go:156
↓ 4 callersFunctionVerifySELinuxMount
VerifySELinuxMount smoke-tests a relabeled bind mount the way real scans use one, so an SELinux denial fails once at startup with an actionable messag
internal/worker/selinux.go:161
↓ 4 callersFunctioncanonicalType
canonicalType reduces a PURL type or ecosystem string to the one PURL type both sources agree on.
internal/db/ecosystem.go:83
↓ 4 callersFunctioncontainerScriptOutput
containerScriptOutput runs `sh -c script` in a throwaway container with the given extra run args and returns trimmed combined output.
internal/worker/podman_integration_test.go:208
↓ 4 callersFunctiondependentCacheRoot
dependentCacheRoot returns the shared on-disk path scrutineer reuses across exposure scans of the same dependent URL. Keyed by sha256 of the URL so di
internal/worker/exposure.go:23
↓ 4 callersFunctionecosystemsRawReq
(t *testing.T, s *Server, token string, repoID uint, source string)
internal/web/api_ecosystems_test.go:13
↓ 4 callersFunctioneffectiveEffort
effectiveEffort resolves the claude --effort level: the per-scan value snapshotted at enqueue wins, then the runner's configured default.
internal/worker/claude.go:319
↓ 4 callersFunctionfetchRef
fetchRef updates an existing cache checkout to ref, or to the remote's default branch when ref is empty. It fetches the ref by name and resets to FETC
internal/worker/clone.go:158
↓ 4 callersFunctionfirstNonEmpty
(ss ...string)
internal/ingest/sarif.go:230
↓ 4 callersMethodfullClone
()
cmd/scrutineer/main.go:266
↓ 4 callersMethodimportFindings
importFindings mirrors the worker's fingerprint-then-upsert loop so an import behaves like a scan: re-importing the same report bumps SeenCount on exi
internal/web/import.go:222
↓ 4 callersFunctioninitOrigin
initOrigin builds a bare repo whose default branch has two commits with a tag at the first one. Returns (origin URL using file://, sha of first commit
internal/skills/git_test.go:54
↓ 4 callersFunctionloadWorkbench
loadWorkbench assembles the workbench tab's data. seedReport is the latest threat-model scan's report.json, used to seed the editor when the operator
internal/web/threat_workbench.go:80
↓ 4 callersFunctionlockForTag
(tag string)
internal/worker/profile.go:480
↓ 4 callersFunctionlookupFetcher
lookupFetcher builds a fetcher for the single-response ?param={repoURL} lookup endpoints (repo, packages, commits, issues).
internal/worker/ecosystems.go:162
↓ 4 callersFunctionmarkerPresent
markerPresent reports whether a single marker is satisfied under srcDir, dispatching on the marker's mode (exact path, Glob pattern, or bounded Walk).
internal/worker/profile.go:356
↓ 4 callersMethodmetadataDir
stageContext writes the workspace-level context.json that every skill can rely on. Kept small and boring on purpose: skills that need more detail can
internal/worker/skill.go:1044
↓ 4 callersFunctionnormaliseSeverity
(s string)
internal/ingest/ingest.go:38
↓ 4 callersFunctiononeLine
(s string)
internal/worker/skill.go:1016
↓ 4 callersFunctionparseFindingIDs
parseFindingIDs reads the finding_ids form values, which may arrive as repeated fields and/or comma-separated lists, into a de-duplicated slice. An em
internal/web/validate_fix_enqueue.go:128
↓ 4 callersFunctionparseHardenedNetworkNames
parseHardenedNetworkNames extracts strict-prefix matches from the output of the runtime's network listing. The docker/podman --filter name= is a subst
internal/worker/container.go:1208
↓ 4 callersMethodparseReleaseWatchOutput
parseReleaseWatchOutput records whether the upstream has cut a release containing the fix. When released=true, the tag, URL, and timestamp go to the f
internal/worker/skill_parsers.go:829
↓ 4 callersMethodparseRepoOverviewOutput
parseRepoOverviewOutput reads `brief`'s structured output and writes the detected fields onto the Repository row. Brief wins over ecosyste.ms for the
internal/worker/skill_parsers.go:508
↓ 4 callersFunctionparseVerifyStatus
parseVerifyStatus pulls the verify skill's status enum out of a verify scan's report.json. Empty when the report is absent or unparseable, which the c
internal/web/validate_fix.go:137
↓ 4 callersFunctionprofileBuildArgs
profileBuildArgs assembles the `build` argv for a profile image. Pure (no I/O) so the chained-vs-runner branching is unit-testable without a runtime.
internal/worker/profile.go:644
↓ 4 callersFunctionproxyPortFromURL
proxyPortFromURL extracts the port from a proxy URL of the shape ProxyURL produces (http://user:tok@HOST:PORT).
internal/worker/container.go:1158
↓ 4 callersFunctionrank
(levels []string, v string)
internal/db/finding_helpers.go:198
↓ 4 callersFunctionread
(t *testing.T, path string)
internal/ingest/ingest_test.go:9
↓ 4 callersFunctionresolveBaseDigest
resolveBaseDigest returns a content fingerprint of runnerImage as it currently resolves in the registry, so a moved tag (notably the default :latest)
internal/worker/profile.go:531
↓ 4 callersFunctionresolveModelPreference
(gdb *gorm.DB, preference, fallback string)
internal/web/models.go:185
↓ 4 callersMethodresolveProfile
resolveProfile picks the runner image for this scan. When requested is non-empty, the operator's choice wins (and "default" forces the default image);
internal/worker/container.go:471
↓ 4 callersMethodresumeAccountPaused
(ctx context.Context)
internal/worker/worker.go:889
↓ 4 callersFunctionrouteGatewayIPv4
(out []byte)
internal/worker/container.go:665
↓ 4 callersFunctionscalarString
(v any)
internal/web/jsontree.go:95
↓ 4 callersMethodscanEmitter
scanEmitter returns the emit callback handed to a job handler. It appends each event to scan.Log in memory and streams it live to subscribers via publ
internal/worker/worker.go:404
↓ 4 callersFunctionscanFromRequest
scanFromRequest pulls the authenticated scan off the request context.
internal/web/api.go:73
↓ 4 callersFunctionscanSummary
(sc db.Scan)
internal/web/api.go:455
↓ 4 callersFunctionseedCacheFile
seedCacheFile writes a file of n bytes into the clone cache for url under dataDir, so RepoDiskUsage reports a known non-zero size.
internal/worker/repo_cache_test.go:18
↓ 4 callersFunctionseedFindingForForm
(t *testing.T, s *Server)
internal/web/finding_forms_test.go:13
↓ 4 callersFunctionsetUpBundleFinding
(t *testing.T, s *Server, withPatch bool)
internal/web/finding_bundle_test.go:46
← previousnext →201–300 of 2,165, ranked by callers