oliver-kriska/claude-elixir-phoenix / targets/amp/skills/phx-deps-audit
phx-deps-audit
FlaggedAudit Hex deps for supply-chain security risk — bidi chars, compile-time exec, maintainer changes, typosquats, CVEs. Use after mix deps.update, when checking if a package upgrade is safe, or reviewing mix.lock PR diffs.
priv/yara/hex-malware.yar
View on GitHub// hex-malware.yar — byte-pattern starter rules for /phx:deps-audit.
//
// Soft dep: only runs if `yara` is on PATH. Findings normalize to the
// Phase 1 NDJSON finding shape with rule_id namespaced as yara/<name>.
//
// Targets: detection patterns that are CHEAPER as byte-scans than as
// AST walks. Examples: large base64 blobs (faster than perl regex),
// BEAM bytecode magic embedded as string literal, cross-ecosystem
// npm-attack signatures translated from event-stream/flatmap-stream.
rule large_base64_blob {
meta:
description = "Large base64-like literal in source (>=256 chars)"
rule_id = "yara/large_base64_blob"
severity = "warn"
author = "phx-deps-audit"
strings:
$b64 = /[A-Za-z0-9+\/]{256,}={0,2}/
condition:
$b64 and filesize < 50KB
}
rule beam_magic_in_source {
meta:
description = "BEAM bytecode FOR1 magic inside source string literal"
rule_id = "yara/beam_magic_in_source"
severity = "block"
author = "phx-deps-audit"
strings:
$for1 = "FOR1"
$beam_ext = ".beam"
condition:
// BEAM files start with FOR1; finding it inside an .ex file's
// string literal is highly suspicious (loader gadget).
$for1 in (0..filesize) and any of ($beam_ext)
}
rule gzip_magic_in_source {
meta:
description = "Gzip magic bytes in source — possibly embedded payload"
rule_id = "yara/gzip_magic_in_source"
severity = "warn"
author = "phx-deps-audit"
strings:
$gzip = { 1F 8B 08 }
condition:
$gzip and filesize < 50KB
}
rule zip_magic_in_source {
meta:
description = "Zip magic bytes in source — possibly embedded payload"
rule_id = "yara/zip_magic_in_source"
severity = "warn"
author = "phx-deps-audit"
strings:
$zip = { 50 4B 03 04 }
condition:
$zip and filesize < 50KB
}
rule event_stream_flatmap_signature {
meta:
description = "Cross-ecosystem npm-attack signature (event-stream/flatmap-stream)"
rule_id = "yara/event_stream_flatmap_signature"
severity = "warn"
author = "phx-deps-audit"
strings:
$a = "flatmap-stream"
$b = "flatmap_stream"
condition:
any of them
}
rule curl_attacker_pattern {
meta:
description = "curl invocation with non-https or http-only literal URL (exfil pattern)"
rule_id = "yara/curl_attacker_pattern"
severity = "warn"
author = "phx-deps-audit"
strings:
$c1 = "curl"
$exfil = /http:\/\/[^"'\s]+/
condition:
all of them
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |