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
↓ 5 callers
Method
autoComputeFixValidation
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 callers
Method
autoEnqueueRevalidate
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 callers
Function
buildEgressAllow
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 callers
Function
buildSkillPrompt
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 callers
Function
builtinModelForTier
(tier, fallback string)
internal/web/models.go:149
↓ 5 callers
Method
checkHardenedWorkspace
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 callers
Function
classifyScope
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 callers
Function
containsSubstr
(events []string, sub string)
internal/worker/patch_gate_test.go:384
↓ 5 callers
Function
copyTree
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 callers
Function
decodeJSON
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 callers
Function
dirSize
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 callers
Function
ensureClone
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 callers
Function
envMap
envMap turns a map into a getenv-shaped lookup with "" for misses.
cmd/scrutineer/proxy_test.go:14
↓ 5 callers
Function
gateRepo
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 callers
Function
git
(ctx context.Context, dir string, args ...string)
internal/skills/git.go:114
↓ 5 callers
Function
gitHead
(dir string)
internal/worker/clone.go:224
↓ 5 callers
Method
hardenedEgressBlockArgs
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 callers
Method
injectProfileGuide
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 callers
Function
isHX
(r *http.Request)
internal/web/server.go:479
↓ 5 callers
Function
listSlice
(m map[string]any, key string)
internal/web/repo_report.go:657
↓ 5 callers
Function
makeProbeDB
(t *testing.T, path string)
cmd/scrutineer/backup_test.go:14
↓ 5 callers
Method
needsKeepID
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 callers
Function
newExposureWorker
(t *testing.T)
internal/worker/exposure_test.go:11
↓ 5 callers
Function
newPatchOutputFixture
(t *testing.T)
internal/worker/patch_gate_test.go:230
↓ 5 callers
Function
newSchemaTestWorker
(t *testing.T, strict bool)
internal/worker/schema_validate_test.go:86
↓ 5 callers
Function
osvAffectedKinds
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 callers
Function
parseHighlight
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 callers
Method
parseRevalidateOutput
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 callers
Function
postExploitedForm
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 callers
Function
pullOrSkip
(t *testing.T, rt ContainerRuntime, image string)
internal/worker/podman_integration_test.go:45
↓ 5 callers
Function
quietLog
()
cmd/scrutineer/main_test.go:280
↓ 5 callers
Function
readCappedReport
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 callers
Function
renderMarkdown
(src string)
internal/web/markdown.go:15
↓ 5 callers
Method
repoBlob
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 callers
Function
resolveListen
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 callers
Function
runBackup
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 callers
Method
runFindingSkill
(w http.ResponseWriter, r *http.Request, name string, skipOpen bool)
internal/web/server.go:1305
↓ 5 callers
Function
runRestore
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 callers
Function
seedAuditFixture
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 callers
Function
seedExposureFixtures
(t *testing.T, w *Worker)
internal/worker/exposure_test.go:20
↓ 5 callers
Function
seedFindingForAPI
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 callers
Function
seedScanWithSkill
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 callers
Function
severityRank
(severity string)
internal/web/org_summary.go:134
↓ 5 callers
Function
shortCommit
(c string)
internal/web/repo_report.go:748
↓ 5 callers
Function
testGitEnv
()
internal/worker/git_testenv_test.go:5
↓ 5 callers
Function
withTestModels
(t *testing.T, models []Model)
internal/web/models_test.go:5
↓ 4 callers
Function
BaseScoreFromVector
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 callers
Method
CacheHitRatio
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 callers
Function
DependencyFindings
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 callers
Function
DependencyVisibleByDefault
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 callers
Method
EnsureCommit
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 callers
Method
Error
()
internal/worker/clone.go:24
↓ 4 callers
Function
GetSetting
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 callers
Function
HostSELinuxState
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 callers
Function
JoinPatterns
JoinPatterns serialises a slice of patterns into the newline form stored on db.Skill.
internal/skills/filter.go:159
↓ 4 callers
Function
ProxyURLForHost
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 callers
Method
Register
(name string, fn jobs.Func)
internal/queue/queue.go:83
↓ 4 callers
Method
Register
(q *queue.Queue)
internal/worker/worker.go:448
↓ 4 callers
Function
SetFindingLabels
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 callers
Function
ValidateEffort
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 callers
Function
ValidateRuntime
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 callers
Function
VerifySELinuxMount
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 callers
Function
canonicalType
canonicalType reduces a PURL type or ecosystem string to the one PURL type both sources agree on.
internal/db/ecosystem.go:83
↓ 4 callers
Function
containerScriptOutput
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 callers
Function
dependentCacheRoot
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 callers
Function
ecosystemsRawReq
(t *testing.T, s *Server, token string, repoID uint, source string)
internal/web/api_ecosystems_test.go:13
↓ 4 callers
Function
effectiveEffort
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 callers
Function
fetchRef
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 callers
Function
firstNonEmpty
(ss ...string)
internal/ingest/sarif.go:230
↓ 4 callers
Method
fullClone
()
cmd/scrutineer/main.go:266
↓ 4 callers
Method
importFindings
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 callers
Function
initOrigin
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 callers
Function
loadWorkbench
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 callers
Function
lockForTag
(tag string)
internal/worker/profile.go:480
↓ 4 callers
Function
lookupFetcher
lookupFetcher builds a fetcher for the single-response ?param={repoURL} lookup endpoints (repo, packages, commits, issues).
internal/worker/ecosystems.go:162
↓ 4 callers
Function
markerPresent
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 callers
Method
metadataDir
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 callers
Function
normaliseSeverity
(s string)
internal/ingest/ingest.go:38
↓ 4 callers
Function
oneLine
(s string)
internal/worker/skill.go:1016
↓ 4 callers
Function
parseFindingIDs
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 callers
Function
parseHardenedNetworkNames
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 callers
Method
parseReleaseWatchOutput
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 callers
Method
parseRepoOverviewOutput
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 callers
Function
parseVerifyStatus
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 callers
Function
profileBuildArgs
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 callers
Function
proxyPortFromURL
proxyPortFromURL extracts the port from a proxy URL of the shape ProxyURL produces (http://user:tok@HOST:PORT).
internal/worker/container.go:1158
↓ 4 callers
Function
rank
(levels []string, v string)
internal/db/finding_helpers.go:198
↓ 4 callers
Function
read
(t *testing.T, path string)
internal/ingest/ingest_test.go:9
↓ 4 callers
Function
resolveBaseDigest
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 callers
Function
resolveModelPreference
(gdb *gorm.DB, preference, fallback string)
internal/web/models.go:185
↓ 4 callers
Method
resolveProfile
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 callers
Method
resumeAccountPaused
(ctx context.Context)
internal/worker/worker.go:889
↓ 4 callers
Function
routeGatewayIPv4
(out []byte)
internal/worker/container.go:665
↓ 4 callers
Function
scalarString
(v any)
internal/web/jsontree.go:95
↓ 4 callers
Method
scanEmitter
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 callers
Function
scanFromRequest
scanFromRequest pulls the authenticated scan off the request context.
internal/web/api.go:73
↓ 4 callers
Function
scanSummary
(sc db.Scan)
internal/web/api.go:455
↓ 4 callers
Function
seedCacheFile
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 callers
Function
seedFindingForForm
(t *testing.T, s *Server)
internal/web/finding_forms_test.go:13
↓ 4 callers
Function
setUpBundleFinding
(t *testing.T, s *Server, withPatch bool)
internal/web/finding_bundle_test.go:46
← previous
next →
201–300 of 2,165, ranked by callers