MCPcopy Create free account

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

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

↓ 2 callersFunctioncheckGlobList
(m map[string]any, key string)
internal/skills/parse.go:314
↓ 2 callersFunctioncheckLocationFile
checkLocationFile returns "" when the diff touches at least one file named in location, otherwise a one-line reason. It matches on file, not line: a f
internal/worker/patch_gate.go:108
↓ 2 callersMethodclaudeConfigDir
claudeConfigDir is the host directory holding the claude session store for this scan's lineage. The container runner mounts it as CLAUDE_CONFIG_DIR so
internal/worker/worker.go:359
↓ 2 callersMethodclaudeConfigDirID
(scanID uint)
internal/worker/worker.go:363
↓ 2 callersFunctioncsafProductSuffix
(f db.Finding)
internal/web/finding_csaf.go:563
↓ 2 callersFunctioncweFromTags
cweFromTags extracts a single CWE id from SARIF rule tags. CodeQL emits "external/cwe/cwe-079", other tools emit "CWE-79"; both match.
internal/ingest/sarif.go:221
↓ 2 callersFunctiondedupCandidateOpen
dedupCandidateOpen reports whether a finding is still in the active funnel and so eligible to be marked (or kept as) a duplicate. The complement of db
internal/worker/skill_parsers.go:1071
↓ 2 callersMethoddedupFinding
(repoID, findingID uint)
internal/worker/skill_parsers.go:1054
↓ 2 callersFunctiondedupQueued
(s *Server, repoID, dedupID uint)
internal/web/finding_dedup_enqueue_test.go:34
↓ 2 callersFunctiondetectForge
(htmlURL string)
internal/web/forge_link.go:24
↓ 2 callersFunctiondirBlanketed
(rel string, patterns []string)
internal/skills/filter.go:50
↓ 2 callersFunctiondistinctLanguages
distinctLanguages returns the sorted set of individual language names across every repository. Repository.Languages is a ", "-joined string written by
internal/web/server.go:576
↓ 2 callersFunctiondnsCandidates
dnsCandidates reduces an egress allowlist to resolvable hostnames for the sidecar's DNS readiness check: it drops the host-gateway alias (which resolv
internal/worker/egress.go:444
↓ 2 callersFunctionecosystemsGetWithLink
ecosystemsGetWithLink performs one GET and returns the size-capped body plus the rel="next" URL from the Link header, if present. Redirects are follow
internal/worker/ecosystems.go:321
↓ 2 callersFunctioneffectiveMaxTurns
effectiveMaxTurns resolves the turn cap: per-skill wins, then global, then the built-in default of 30.
internal/worker/claude.go:307
↓ 2 callersFunctionemitProxyLogLines
emitProxyLogLines forwards the WARN/ERROR lines of a sidecar's log output into the scan record (prefixed "egress-proxy:"), dropping routine INFO readi
internal/worker/container.go:961
↓ 2 callersMethodenqueueRevalidateForFinding
enqueueRevalidateForFinding looks up the active revalidate skill and enqueues a finding-scoped run. No revalidate skill means no auto-sort, which is f
internal/web/revalidate_enqueue.go:61
↓ 2 callersMethodensureImportRepo
ensureImportRepo resolves a repository URL from an import request to a Repository row, creating it on first sight.
internal/web/import.go:154
↓ 2 callersFunctionescapeBlobPath
(p string)
internal/web/location.go:43
↓ 2 callersFunctionevalRunnerStaleness
evalRunnerStaleness is the pure staleness decision, split out so it can be tested without a registry: the image is stale when the registry digest has
internal/worker/staleness.go:72
↓ 2 callersFunctionexpandRepoSlug
expandRepoSlug turns a bare "owner/repo" into a GitHub URL. The CSV export carries only the slug and the producer is GitHub-only, so this is the only
internal/ingest/csv.go:105
↓ 2 callersFunctionfailCreate
failCreate registers a before-create callback that fails any insert for which pred returns true, simulating a mid-write database error. The returned f
internal/db/finding_helpers_test.go:227
↓ 2 callersMethodfailScanPrereqs
(scan *db.Scan, skillName, msg string, missing []string)
internal/worker/preflight.go:161
↓ 2 callersFunctionfetchGitHubRepos
fetchGitHubRepos pages through /{kind}/{owner}/repos and returns every repo.
internal/web/org_import.go:78
↓ 2 callersFunctionfindingIDs
findingIDs collects the IDs of a finding slice for membership assertions.
internal/web/vuln_scan_bucket_test.go:10
↓ 2 callersFunctionfindingIndexWhereSQL
(r *http.Request, includeScanners, includeMissed bool)
internal/web/server.go:995
↓ 2 callersFunctionfindingSupportsExposure
(scan db.Scan)
internal/web/server.go:1200
↓ 2 callersMethodfindingToggleCounts
(r *http.Request, scanners bool)
internal/web/server.go:972
↓ 2 callersFunctionfirstClause
firstClause returns the text up to the first sentence or clause terminator, trimmed. Used to fit a ruled-out reason into one inventory-table cell whil
internal/web/repo_report.go:718
↓ 2 callersFunctionfirstURL
(xs []struct{ URL string })
internal/worker/cna.go:141
↓ 2 callersFunctionfreeAddr
freeAddr returns a loopback address with nothing listening on it, so the restore server-running guard sees no server.
cmd/scrutineer/backup_test.go:55
↓ 2 callersFunctionfreeformCellString
freeformCellString collapses a JSON value into a single-line string suitable for a markdown table cell. For leaf scalars it delegates to scalarString
internal/web/scan_report.go:443
↓ 2 callersFunctionfullConfig
()
cmd/scrutineer/main_test.go:22
↓ 2 callersFunctiongenSSHKey
genSSHKey returns an unencrypted OpenSSH ed25519 private key PEM and the corresponding public key line.
cmd/scrutineer/main_test.go:296
↓ 2 callersFunctiongetCSAFSchema
getCSAFSchema returns the compiled validator, building it on first call.
internal/web/finding_csaf.go:53
↓ 2 callersFunctiongetRepoPagePath
(t *testing.T, s *Server, path string)
internal/web/repo_show_test.go:36
↓ 2 callersFunctiongitShowBlob
gitShowBlob runs `git show <commit>:<path>` and returns (content, isBinary, truncated, err). The read is capped at maxBrowserBytes+1 so the extra byte
internal/web/code_browser.go:126
↓ 2 callersMethodgoResolve
goResolve launches resolveSBOMPackages. Indirected so tests can run it synchronously and avoid racing the in-memory database teardown.
internal/web/sboms.go:215
↓ 2 callersFunctionhardenedNetworkCreateArgs
hardenedNetworkCreateArgs builds the `network create` args for the per-scan --internal network. --disable-dns is load-bearing: a sidecar later connect
internal/worker/container.go:714
↓ 2 callersFunctionhasMatchingEvent
(events []string, substr string)
internal/worker/skill_test.go:747
↓ 2 callersMethodhasOpenFindingScopedScan
(findingID, skillID uint)
internal/web/revalidate_enqueue.go:84
↓ 2 callersFunctionhighlightLang
highlightLang returns the highlight.js language hint for path, or "" to let the library auto-detect.
internal/web/code_browser.go:186
↓ 2 callersMethodhref
(n int)
internal/web/server.go:540
↓ 2 callersFunctionindent
(s, prefix string)
internal/web/repo_report.go:732
↓ 2 callersMethodinit
()
internal/worker/egress.go:164
↓ 2 callersFunctionisDark
()
internal/web/static/theme-init.js:4
↓ 2 callersFunctionisLLMAuditSkill
isLLMAuditSkill reports whether a finalized scan is one of the curated LLM audits (security-deep-dive, vuln-scan) whose fresh output drives the auto-t
internal/web/server.go:1196
↓ 2 callersFunctionjsonTree
jsonTree turns a JSON document into a nested <dl> for the Data tab. Objects become dl/dt/dd, arrays become ul, scalars are escaped text. Null and empt
internal/web/jsontree.go:26
↓ 2 callersMethodlabel
()
internal/web/threat_workbench.go:203
↓ 2 callersFunctionlistPageQueryCount
(t *testing.T, path string, rows int)
internal/web/list_performance_test.go:118
↓ 2 callersFunctionloadFindingDependents
loadFindingDependents fetches the Dependent rows referenced by the given exposure rows, keyed by ID for cheap lookup in buildCSAF.
internal/web/finding_csaf.go:287
↓ 2 callersFunctionloadRepoFindings
loadRepoFindings returns the open findings for a repo split into two slices: deep-dive output and tool-scanner output (zizmor, semgrep, …). Findings w
internal/web/server.go:837
↓ 2 callersFunctionlocationLess
locationLess sorts file:line strings naturally: by file path first, then by line number as an integer. Without this, "x.html:110" sorts before "x.html
internal/web/repo_report.go:786
↓ 2 callersFunctionlocationPaths
locationPaths returns the file paths a Finding.Location names. A location may list several files with line ranges and a "(data path: a -> b)" trace, e
internal/worker/patch_gate.go:189
↓ 2 callersFunctionlocationURL
locationURL turns a finding location ("path/to/file.rb:12-34") into a link to the in-app code browser pinned to the recorded scan commit. Returns "" w
internal/web/location.go:14
↓ 2 callersMethodlookupKnownPURLs
(deps []DepGroup)
internal/web/server.go:2475
↓ 2 callersMethodlookupKnownURLs
(dependents []db.Dependent)
internal/web/server.go:2507
↓ 2 callersFunctionmapProductStatus
mapProductStatus picks the CSAF product_status bucket. FindingPublished means the advisory went out, not that the bug is fixed; only emit "fixed" when
internal/web/finding_csaf.go:573
↓ 2 callersFunctionmatchProfile
(briefOut []byte, srcDir string)
internal/worker/profile.go:270
↓ 2 callersFunctionmodelTierSettingKey
(tier string)
internal/web/models.go:109
↓ 2 callersFunctionmultipartReq
(t *testing.T, path, field, filename, content string)
internal/web/sboms_test.go:29
↓ 2 callersMethodneedsHardenedNetVerify
needsHardenedNetVerify reports whether a hardened scan must prove its per-scan --internal network fail-closed before running. True for rootless podman
internal/worker/runtime.go:83
↓ 2 callersFunctionnewDependencyParser
(t *testing.T)
internal/worker/skill_parsers_test.go:1153
↓ 2 callersFunctionnextLink
nextLink extracts the URL of the rel="next" entry from an RFC 8288 Link header, or "" when absent.
internal/worker/ecosystems.go:347
↓ 2 callersFunctionnormaliseCWE
(s string)
internal/ingest/csv.go:122
↓ 2 callersFunctionnormaliseLocation
normaliseLocation reduces "path/to/file.go:42:7" to "path/to/file.go". A leading "./" is stripped so "./src/x.go" and "src/x.go" agree.
internal/db/fingerprint.go:42
↓ 2 callersMethodnormalizePaths
normalizePaths expands a leading ~ in the host-filesystem paths scrutineer opens or creates (data dir, local skill dirs, profiles dir, and the recipie
cmd/scrutineer/main.go:275
↓ 2 callersFunctionnotFound
(err error)
internal/web/org_import.go:72
↓ 2 callersFunctionnoteworthyProxyLogLine
noteworthyProxyLogLine reports whether a sidecar log line is worth surfacing into the scan record -- denials and failures (WARN/ERROR), not routine IN
internal/worker/container.go:971
↓ 2 callersMethodopenFindingSkillScan
(findingID uint, skillName string)
internal/web/server.go:1335
↓ 2 callersFunctionorgImportToastTitle
orgImportToastTitle summarizes an org import the same way the bulk paste path does, plus a count of repos held back by the fork/archived filters.
internal/web/org_import.go:268
↓ 2 callersFunctionosvAliases
osvAliases collects upstream identifiers: the finding's CVE and GHSA id plus any GHSA id found in a reference URL or summary. De-duplicated, CVE first
internal/web/finding_osv.go:269
↓ 2 callersFunctionosvCWEIDs
osvCWEIDs splits the finding's comma-joined CWE string into an array of normalised `CWE-N` ids, deduped and order-preserved.
internal/web/finding_osv.go:479
↓ 2 callersFunctionosvEcosystem
(pkg db.Package)
internal/web/finding_osv.go:324
↓ 2 callersFunctionosvReferenceType
osvReferenceType maps a finding reference's comma-joined tags to one of OSV's reference type enum values, defaulting to WEB.
internal/web/finding_osv.go:417
↓ 2 callersFunctionosvSemverRangeFromFix
osvSemverRangeFromFix turns a `fix_version` like "1.6.3" (with or without a leading "v") into a SEMVER range pinned at introduced=0 and fixed=<that ve
internal/web/finding_osv.go:381
↓ 2 callersFunctionparseCNAList
(data []byte)
internal/worker/cna.go:87
↓ 2 callersFunctionparseCVSSv3Vector
(vec string)
internal/web/finding_csaf.go:648
↓ 2 callersMethodparseDiscloseOutput
parseDiscloseOutput posts a FindingNote summarising a disclose run so the finding's Notes panel records that a draft was prepared, alongside the verif
internal/worker/skill_parsers.go:772
↓ 2 callersFunctionparseImageInspect
parseImageInspect parses the two-line `image inspect` output (digest line, then created line) localRunnerImage's format template produces. A missing R
internal/worker/staleness.go:110
↓ 2 callersMethodparsePackagesOutput
parsePackagesOutput replaces Package rows for the scan's repository. We delete all existing rows and insert whatever the skill produced, mirroring the
internal/worker/skill_parsers.go:103
↓ 2 callersFunctionparsePodmanInfo
parsePodmanInfo splits the "<version>|<rootless>" line emitted by the podman info probe. ok is false when the line is malformed or the rootless field
internal/worker/runtime.go:231
↓ 2 callersMethodparseVerifyOutput
parseVerifyOutput records the outcome of a finding-scoped verification run. Reproducer, evidence and notes become a FindingNote; the status transition
internal/worker/skill_parsers.go:594
↓ 2 callersMethodpersistFinding
persistFinding writes one finding into the repository's finding set using fingerprint dedup: a match re-observes the existing row, otherwise a new row
internal/worker/skill.go:436
↓ 2 callersFunctionpkgProductID
(pkg db.Package)
internal/web/finding_csaf.go:388
↓ 2 callersFunctionpodmanHostGatewaySupported
podmanHostGatewaySupported reports whether the podman version is recent enough to honour `--add-host host.docker.internal:host-gateway`, which the egr
internal/worker/runtime.go:287
↓ 2 callersFunctionpodmanPastaDefault
podmanPastaDefault reports whether the podman version defaults to the pasta backend (>= 5.0), the most reliable host-gateway -> host-loopback path for
internal/worker/runtime.go:299
↓ 2 callersFunctionprereqBackoff
prereqBackoff doubles the base delay per attempt up to MaxPrereqRetryDelay. Prereqs include hour-scale scans (semgrep, threat-model) competing for run
internal/worker/preflight.go:100
↓ 2 callersMethodproxySidecarRunArgs
proxySidecarRunArgs builds the detached `run` args for the egress proxy sidecar: locked down (cap-drop ALL, read-only rootfs, no-new-privileges, a sma
internal/worker/container.go:897
↓ 2 callersFunctionpurlType
purlType returns the ecosystem segment of a Package URL (the bit between "pkg:" and the first "/").
internal/web/sboms.go:333
↓ 2 callersFunctionreadFakeContainerLog
(t *testing.T, path string)
internal/worker/versions_test.go:120
↓ 2 callersFunctionreconcileEcosystem
(ecosystem string)
internal/db/ecosystem.go:27
↓ 2 callersFunctionredactURLUserinfo
redactURLUserinfo strips embedded credentials from a URL before logging. Anthropic-compatible base URLs sometimes carry a token in userinfo (https://u
internal/worker/container.go:174
↓ 2 callersMethodrefreshRepoDiskUsage
refreshRepoDiskUsage recomputes the clone-cache size for one repository and stores it on the row, so the repo list can read the badge from a column in
internal/worker/repo_cache.go:44
↓ 2 callersFunctionrenderFindingReport
(gdb *gorm.DB, f *db.Finding, scan *db.Scan, repo *db.Repository)
internal/web/finding_report.go:52
↓ 2 callersMethodrenderScanStatus
renderScanStatus loads a scan and renders the OOB row + toast fragment pushed to repo_show via the scan-status SSE event.
internal/web/sse.go:121
↓ 2 callersFunctionrenderSkillMD
renderSkillMD rebuilds a SKILL.md from the stored fields. The frontmatter is re-serialised rather than preserved verbatim so UI edits round-trip clean
internal/worker/skill.go:991
↓ 2 callersMethodrepoCreateError
repoCreateError renders feedback for a failed Add Repository submission. htmx clients get an inline alert inside the dialog (a toast would render behi
internal/web/server.go:1668
↓ 2 callersMethodrepoShow
(w http.ResponseWriter, r *http.Request)
internal/web/server.go:1870
↓ 2 callersFunctionresolveColorScheme
(r *http.Request)
internal/web/theme.go:49
← previousnext →501–600 of 2,165, ranked by callers