Documentation
¶
Overview ¶
Package codeaudit is a light static analyzer (SAST-lite) over a target's source tree (Target.Repo). It flags risky code by pattern — weak cryptography, insecure randomness for security, dangerous execution sinks, and secrets written to logs. It reads files only: no network, no build, no execution. It detects risky patterns; it does not exploit them.
Index ¶
- func Checks() []core.Check
- type DangerousSink
- func (DangerousSink) ASVS() []string
- func (DangerousSink) Category() core.Category
- func (DangerousSink) Description() string
- func (DangerousSink) ID() string
- func (DangerousSink) Mode() core.Mode
- func (DangerousSink) OWASP() []string
- func (DangerousSink) Run(_ context.Context, t core.Target) ([]core.Finding, error)
- type InsecureRandom
- type LLMSecurity
- func (LLMSecurity) ASVS() []string
- func (LLMSecurity) Category() core.Category
- func (LLMSecurity) Description() string
- func (LLMSecurity) ID() string
- func (LLMSecurity) Mode() core.Mode
- func (LLMSecurity) OWASP() []string
- func (LLMSecurity) Run(_ context.Context, t core.Target) ([]core.Finding, error)
- type Obfuscation
- func (Obfuscation) ASVS() []string
- func (Obfuscation) Category() core.Category
- func (Obfuscation) Description() string
- func (Obfuscation) ID() string
- func (Obfuscation) Mode() core.Mode
- func (Obfuscation) OWASP() []string
- func (c Obfuscation) Run(_ context.Context, t core.Target) ([]core.Finding, error)
- type SecretLogging
- func (SecretLogging) ASVS() []string
- func (SecretLogging) Category() core.Category
- func (SecretLogging) Description() string
- func (SecretLogging) ID() string
- func (SecretLogging) Mode() core.Mode
- func (SecretLogging) OWASP() []string
- func (SecretLogging) Run(_ context.Context, t core.Target) ([]core.Finding, error)
- type UnpinnedDeps
- func (UnpinnedDeps) ASVS() []string
- func (UnpinnedDeps) Category() core.Category
- func (UnpinnedDeps) Description() string
- func (UnpinnedDeps) ID() string
- func (UnpinnedDeps) Mode() core.Mode
- func (UnpinnedDeps) OWASP() []string
- func (UnpinnedDeps) Run(_ context.Context, t core.Target) ([]core.Finding, error)
- type WeakCrypto
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DangerousSink ¶
type DangerousSink struct{}
func (DangerousSink) ASVS ¶
func (DangerousSink) ASVS() []string
func (DangerousSink) Category ¶
func (DangerousSink) Category() core.Category
func (DangerousSink) Description ¶
func (DangerousSink) Description() string
func (DangerousSink) ID ¶
func (DangerousSink) ID() string
func (DangerousSink) Mode ¶
func (DangerousSink) Mode() core.Mode
func (DangerousSink) OWASP ¶
func (DangerousSink) OWASP() []string
type InsecureRandom ¶
type InsecureRandom struct{}
func (InsecureRandom) Category ¶
func (InsecureRandom) Category() core.Category
func (InsecureRandom) Description ¶
func (InsecureRandom) Description() string
func (InsecureRandom) ID ¶
func (InsecureRandom) ID() string
func (InsecureRandom) Mode ¶
func (InsecureRandom) Mode() core.Mode
func (InsecureRandom) OWASP ¶
func (InsecureRandom) OWASP() []string
type LLMSecurity ¶ added in v0.4.17
type LLMSecurity struct{}
LLMSecurity flags insecure patterns in LLM/agent applications (OWASP LLM Top 10): framework constructs that let a model run arbitrary code or shell, chains that evaluate model-generated code, and LLM output passed to an execution sink. It reads source only.
func (LLMSecurity) ASVS ¶ added in v0.4.17
func (LLMSecurity) ASVS() []string
func (LLMSecurity) Category ¶ added in v0.4.17
func (LLMSecurity) Category() core.Category
func (LLMSecurity) Description ¶ added in v0.4.17
func (LLMSecurity) Description() string
func (LLMSecurity) ID ¶ added in v0.4.17
func (LLMSecurity) ID() string
func (LLMSecurity) Mode ¶ added in v0.4.17
func (LLMSecurity) Mode() core.Mode
func (LLMSecurity) OWASP ¶ added in v0.4.17
func (LLMSecurity) OWASP() []string
type Obfuscation ¶ added in v0.4.14
type Obfuscation struct{}
Obfuscation flags two supply-chain tampering signals that show up when a repo's config or source is compromised: install/CI scripts that fetch and execute remote code, and obfuscated code that hides a payload (the pattern behind the event-stream, xz and many npm/pip backdoors). It reads files only.
func (Obfuscation) ASVS ¶ added in v0.4.14
func (Obfuscation) ASVS() []string
func (Obfuscation) Category ¶ added in v0.4.14
func (Obfuscation) Category() core.Category
func (Obfuscation) Description ¶ added in v0.4.14
func (Obfuscation) Description() string
func (Obfuscation) ID ¶ added in v0.4.14
func (Obfuscation) ID() string
func (Obfuscation) Mode ¶ added in v0.4.14
func (Obfuscation) Mode() core.Mode
func (Obfuscation) OWASP ¶ added in v0.4.14
func (Obfuscation) OWASP() []string
type SecretLogging ¶
type SecretLogging struct{}
func (SecretLogging) ASVS ¶
func (SecretLogging) ASVS() []string
func (SecretLogging) Category ¶
func (SecretLogging) Category() core.Category
func (SecretLogging) Description ¶
func (SecretLogging) Description() string
func (SecretLogging) ID ¶
func (SecretLogging) ID() string
func (SecretLogging) Mode ¶
func (SecretLogging) Mode() core.Mode
func (SecretLogging) OWASP ¶
func (SecretLogging) OWASP() []string
type UnpinnedDeps ¶
type UnpinnedDeps struct{}
UnpinnedDeps flags npm dependencies declared with a loose version range. This is dependency hygiene (a supply-chain risk), not a CVE scan — reachable-CVE detection (govulncheck/Trivy) is separate, future work.
func (UnpinnedDeps) ASVS ¶
func (UnpinnedDeps) ASVS() []string
func (UnpinnedDeps) Category ¶
func (UnpinnedDeps) Category() core.Category
func (UnpinnedDeps) Description ¶
func (UnpinnedDeps) Description() string
func (UnpinnedDeps) ID ¶
func (UnpinnedDeps) ID() string
func (UnpinnedDeps) Mode ¶
func (UnpinnedDeps) Mode() core.Mode
func (UnpinnedDeps) OWASP ¶
func (UnpinnedDeps) OWASP() []string
type WeakCrypto ¶
type WeakCrypto struct{}
func (WeakCrypto) ASVS ¶
func (WeakCrypto) ASVS() []string
func (WeakCrypto) Category ¶
func (WeakCrypto) Category() core.Category
func (WeakCrypto) Description ¶
func (WeakCrypto) Description() string
func (WeakCrypto) ID ¶
func (WeakCrypto) ID() string
func (WeakCrypto) Mode ¶
func (WeakCrypto) Mode() core.Mode
func (WeakCrypto) OWASP ¶
func (WeakCrypto) OWASP() []string