Repository navigation
Conversation
… matching Match IPs, CIDRs, domains and URLs found in IaC, container and dependency sources against the ThreatFox, Feodo Tracker and URLhaus feeds from the threat-feeds snapshot. Categories are c2-ip, c2-domain and malware-url; a source CIDR that contains a feed address counts, and private, loopback, link-local, documentation and catch-all ranges never match on either side. Malware URLs with a path are redacted to <feed>#<id> in every output. The composite selects tracked files (or files changed against base-sha on pull requests), filters them by include and exclude globs, and writes inline annotations, findings.json and a markdown report. The reusable workflow downloads the snapshot, runs the composite on changed files, and keeps one PR comment edited in place. ThreatFox entries now carry their IOC id in meta so the redaction has something to cite. CI runs the fixture suite, scans the whole repo against the fixture feeds expecting no matches, and runs the live snapshot in advisory mode once the first mirror release exists. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
dependency-review-action asks api.deps.dev for the repository of any added dependency GitHub has no source URL for, and that fetch has no error handling, so the harden-runner block made the job fail with "fetch failed" once the ioc-check fixtures added a go.mod and a package.json with placeholder hosts. Allow the two hosts the action's scorecard column uses and record why in the egress allowlist. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #110. Stacked on #153 (
issue-109-threat-feeds); retarget tomainonce that merges.What
.github/actions/ioc-check: stdlib-onlyioc_check.pyextracts IPv4 addresses, CIDRs, hostnames and URLs from selected files and matches them againstthreatfox.json,feodo.jsonandurlhaus.json. Categories:c2-ip(Feodo and ThreatFoxip),c2-domain(ThreatFoxdomain, subdomains included),malware-url(ThreatFox and URLhausurl). A source CIDR that contains a feed address counts. RFC 1918, loopback, link-local, RFC 5737,0.0.0.0/8, CGNAT, multicast and0.0.0.0/0never match on either side. Malware URLs with a path are redacted to<feed>#<id>in annotations, summary, report andfindings.json.git ls-files, orgit diff --name-only <base-sha> HEADon PRs, filtered by include and exclude globs (defaults cover Terraform, CDK, Dockerfiles, YAML/JSON/TOML and lockfiles; skipnode_modules,.terraform,vendor,tests).block-onpicks which categories fail; empty is advisory. Outputsmatch-count,blocking-count,report-path.ioc-check.ymlreusable workflow: snapshot via the threat-feeds composite (feeds-ref), composite on changed files for PRs,ioc-checkartefact, and one PR comment found by its<!-- ioc-check -->marker and edited in place (a clean run rewrites it to "no indicators matched"). Skipped on fork PRs. Caller grantspull-requests: writefor the comment.normalize.py: ThreatFox entries keep the IOC id inmeta.idso the redaction can cite it (URLhaus already had one).IOC Checkjob runs the fixture suite, scans the whole repo against the fixture feeds (must be clean), then the live snapshot in advisory mode oncethreat-feeds-latestexists (same skip pattern as the Threat Feeds job).docs/egress-allowlist.mdrow.Tests
tests/ioc-check/run.shwith fixture feeds (class E addresses and.exampledomains) and one source fixture per extractor row of the issue: Terraform security-group CIDR and DNS record, DockerfileFROMandcurl, HelmhostAliases,package.jsongit URL and malware URL,go.modreplace, plus a negatives file with private, documentation, loopback and0.0.0.0/0values that the fixture feeds also list. Asserts the exact match set withfile:line, CIDR containment, redaction in every output, advisory and subsetblock-on, include and exclude globs,--files-from, a clean tree and exit codes.Deferred
🤖 Generated with Claude Code
https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF