Inspiration

Vulnerability alerts pile up. Every security scanner flags the same CVEs week after week — requests, lodash, log4j — and developers learn to ignore them because acting on one takes real time: understand the advisory, find a safe upgrade, verify it doesn't break anything, write the diff, open the PR, explain the rationale. For a large codebase with hundreds of pinned dependencies across multiple languages, that work is simply never done.

We wanted to build the tool we wished existed: one that closes the loop. Not "here is a vulnerability" but "here is a verified fix, here is the evidence it works, here is the PR — you decide to merge."

The design constraint we held onto throughout: no unverified fixes. If Arachne cannot prove the fix works, it says so explicitly rather than opening a PR that might break production.


What it does

Arachne is an autonomous dependency-vulnerability remediation agent. Connect a repository, and it:

  1. Scans installed dependencies across 7 language stacks (pip, npm/yarn, Go, Maven, Cargo, Bundler, NuGet) against a live OSV + CISA KEV + EPSS advisory database synced every 6 hours.
  2. Resolves the lowest safe upgrade version that satisfies all advisories simultaneously — cooldown-aware (7-day minimum), gated on major-version bumps.
  3. Patches the manifest and regenerates the lockfile.
  4. Validates through five gates in a sandboxed environment: reinstall from scratch → independent rescan of installed inventory → build → test delta (with deterministically generated smoke tests) → policy check.
  5. Fixes gate failures using an LLM fixer agent that proposes targeted JSON edits with no tools — all output passes through a hard-block EditGate before touching disk.
  6. Opens a PR carrying the full evidence bundle: which advisory was fixed, why this version was chosen, each gate result with a log excerpt, the test delta, the diff, generated smoke tests, and a confidence label (high / medium / low).

It also exposes an MCP server with 9 tools, so AI coding assistants (Claude, Cursor, Windsurf, Kiro) can query the vulnerability database, propose safe versions, and trigger jobs without leaving the IDE.

We opened 10 real pull requests against a live repo across Python, JavaScript, Go, Java, Rust, Ruby, and Meteor. 36 of 46 testbed cases match ground truth; every mismatch is documented.

The project also ships Hollowmere, a fully animated Halloween landing page — five illustrated scenes with ghost-light waterfalls, lava streams, ghost sprites with cursor repulsion, bat flapping, and smooth-scroll parallax — built entirely from a single Kiro spec.


How we built it

Everything was built inside Kiro IDE. The workflow that made it possible at this scale:

Spec-driven development. Three specs in .kiro/specs/ drove the implementation. Writing the spec first forced precision: "the resolver picks the lowest safe version" is ambiguous; "the resolver picks the lowest safe version that satisfies all advisories simultaneously, respects a 7-day cooldown, and stops at needs_approval for major bumps" is not. Kiro's implementation then matched exactly what the spec said. The 10 real PRs with 36/46 testbed matches are a direct result of that discipline.

Steering files. Four steering docs in .kiro/steering/ gave Kiro persistent context across sessions: project architecture, security invariants (auto-included on pipeline edits so Kiro flagged potential SSRF or token-exposure issues proactively), test standards, and web conventions. This eliminated the need to repeat context at the start of every session.

Agent hooks. Four hooks automated the development loop: ruff linting on every Python save, a security-constraints pre-write reminder, pytest running automatically after each spec task completes (the highest-value automation — regressions caught within seconds), and bandit on session start for a lightweight SAST reminder.

Property-based testing. hypothesis fuzzed LooseVer (version comparator), EditGate (the invariant "a fully compromised model changes nothing on disk" is a property), and the advisory parser. PBT caught a CalVer year edge case that unit tests missed.

AWS serverless architecture. Lambda (container image) behind API Gateway and CloudFront, DynamoDB for all data, Cognito for auth, Secrets Manager for tokens, and CodeBuild for sandboxed fix jobs. The Kiroween submission runs as a fully separate Terraform stack (infra/kiroween) with its own Cognito pool and DynamoDB tables.


Challenges we ran into

Making the validation loop actually work across 7 language stacks. Each ecosystem has its own toolchain idiosyncrasies — Maven needs a real mvn in Docker with a settings.xml mirror, NuGet and Maven both require a "late discovery" re-run because transitive vulnerabilities only become visible after patching and installing, Ruby's minitest produces non-standard output that needs a custom parser, Go tests output JSON only with -json flag. Getting gate_clean_room to reliably distinguish "this tool isn't installed" (UNVERIFIABLE) from "the install actually failed" (FAIL) across all stacks took more iteration than expected.

The LLM fixer's hard safety boundary. We wanted a property: "even if the model is fully compromised and emits every possible forbidden edit, nothing on disk changes." The EditGate block list covers paths, directories, file extensions, test files, and injection patterns. Getting the block list right required property-based testing with hypothesis — generating thousands of adversarial edit payloads and asserting zero forbidden writes. The final invariant held in every hypothesis run.

Private repository clone security. When a fix job clones a private repo, the connection token must reach exactly one git process's environment — never in argv (visible in process listings), never in the URL (logged by proxies), never written to any config file. The solution was GIT_CONFIG_COUNT/KEY/VALUE environment variables setting http.<url>.extraheader, plus a redact() function that strips every base64 form of the token from git stderr before it touches a log. Getting this right across GitHub, GitLab, and Bitbucket with their different auth schemes (each has a different username for HTTP Basic auth) was careful work.

The Hollowmere page performance. Rendering up to 7 canvas animations simultaneously (falls, particles, seam canvases) at 60fps on a scroll-driven parallax page required careful RAF scheduling and pre-rendered sprite sheets. The smooth-scroll easing (1 - e^(-7.5·dt)) with snap-at-0.05px prevents jitter without introducing latency. Reduced-motion support required every animation path to have an explicit still-frame fallback.

Git history divergence between machines. The arachne-kiroween remote and the local repo ended up with fully independent histories from parallel development. Reconciling them required a merge-with-unrelated-histories, taking kiroween's version on all conflicts, then cleanly replaying the new commits on top.


Accomplishments that we're proud of

10 real pull requests opened against a live repository, across 7 language stacks, with gate results and evidence bundles in every PR body. Not fixtures — actual dependency upgrades that passed reinstall, rescan, build, test delta, and policy gates.

36/46 testbed cases match ground truth. The 10 mismatches are all documented in docs/testbed.md with root-cause explanations. The testbed process — running the pipeline against a curated set of known-vulnerable repos and comparing outcomes — is itself a contribution; most remediation tools have no comparable ground-truth evaluation.

The EditGate property held under hypothesis fuzzing. "A fully compromised model emitting every possible edit changes nothing on disk" is not a claim we made without evidence — it held across thousands of generated adversarial payloads.

The MCP server works with Kiro right now. https://kiroween.withaadhi.com/mcp is live. Add the token to ~/.kiro/settings/mcp.json and you can ask an AI assistant "is my Flask version vulnerable?", get the advisory, get the safe version, trigger the fix job, and check the outcome — all in the chat context.

Hollowmere. A fully animated illustrated descent page built from a single Kiro spec: five scenes, ghost-light waterfalls, lava streams, 7 particle systems, ghost cursor repulsion, bat flapping, smooth scroll parallax, full reduced-motion support. The spec was precise enough that Kiro produced the working implementation in one pass.


What we learned

Precision in a spec pays off non-linearly. Vague requirements produce working-looking code with subtle gaps. "The gate catches errors" is vague. "The gate catches errors and returns GateResult(status=ERROR), never re-raises, and is decorated with @graceful" is precise. The difference shows up in production: a gate that re-raises crashes the whole pipeline; a gate that returns ERROR lets the other gates still run.

Security steering files change how you write code, not just how you review it. Having security-constraints.md auto-included on pipeline edits meant Kiro reminded itself of the SSRF prevention rules and the token write-only rule during code generation, not just during review. It caught a potential issue where a new error message would have included a token fragment — before the code was written.

Property-based testing is especially valuable for security invariants. Unit tests cover the cases you thought of. PBT covers the cases you didn't. For EditGate specifically, the invariant is a formal property; PBT is the right tool for it.

Hooks are most valuable when they remove friction from the feedback loop. pytest running automatically after each task completion — not "run tests now" as a separate step — meant regressions were caught while the context was still warm. That alone saved multiple debugging sessions.

The LLM is not the validator. The LLM fixer proposes edits; the five gates validate them. The gates are deterministic and do not involve a model. This separation is what makes the confidence label meaningful: high means no LLM touched first-party code and all gates passed, not "the model said it looks good."


What's next for Arachne Kiroween

Gradle adapter. Maven is covered; Gradle (Groovy DSL build.gradle) is the second most common Java build tool and is structurally different. Detection, resolver, patcher, and all five gates need Gradle-specific implementations.

Database-backed advisory store. The current store loads full per-ecosystem shards into memory at startup. A query-by-package index would reduce memory usage significantly and make the scan step faster for large repositories.

PR-first workflow. Currently: scan → review findings in UI → submit fix job → wait for gates → open PR. A future workflow: scan surfaces findings → "Fix all" queues a batch job → gates run in parallel per package → one PR per verified fix is ready for review without any intermediate steps.

Streaming gate output. The current API returns gate results only after the job completes. A Server-Sent Events stream on GET /api/jobs/{id}/status would let the UI show gates passing in real time, which makes the platform feel much more alive.

Poetry and uv full end-to-end support. Poetry is currently Tier 2 (static planning). uv is becoming the dominant Python dependency manager; full end-to-end support for both is the highest-priority Python ecosystem item.

Built With

Share this project:

Updates

Submission history