nullsec-s1  by trynullsec

Security auditing LLM for AI-generated applications

Created 2 weeks ago

New!

258 stars

Top 98.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Nullsec-S1 addresses the challenge of auditing AI-generated applications and code, where traditional security tools and general LLMs fall short in providing consistent, actionable security verdicts. This security-native LLM system, targeted at engineers and researchers, delivers structured JSON security audits, enabling automated CI checks and agent workflows with high precision and low false positives.

How It Works

The system employs a PEFT/QLoRA adapter fine-tuned on the Qwen/Qwen2.5-Coder-7B-Instruct base model. Its core innovation lies in a two-stage deterministic enforcement pipeline: a Security Alignment Layer validates and normalizes the LLM's raw output against a strict JSON schema, followed by a Nullsec Safety Layer that enforces security rules (R1-R6) and recomputes a production_ready status. This architecture ensures robust security verdicts, resilient to prompt injection, and provides structured findings, severity, exploit scenarios, and recommended fixes.

Quick Start & Requirements

Installation involves pip install -e ".[dev]" and pip install -r requirements-train-cu121.txt. Users must separately acquire the Qwen/Qwen2.5-Coder-7B-Instruct base model. Inference can be run via python inference.py or by serving the Hugging Face adapter (Trynullsec/nullsec-s1) with FastAPI. A CLI tool (npx @s1-clm/s1 scan) is also available. Training requires a CUDA-enabled NVIDIA GPU. Key resources include the GitHub Release and Hugging Face adapter.

Highlighted Details

  • Achieved #1 ranking on the Nullsec RC2/v1.1 111-case security benchmark for AI-generated applications, outperforming models like Claude Opus and OpenAI Codex.
  • Demonstrated a 0.0% false-safe rate and a 6.7% hallucination rate, significantly lower than leading frontier API baselines.
  • The adapter is specifically trained to output structured, security-focused JSON verdicts, enhancing format adherence, recall, and precision.
  • A deterministic Safety Layer independently verifies production_ready status, providing a strong defense against adversarial manipulation.

Maintenance & Community

The repository includes CONTRIBUTING.md and SECURITY.md files, indicating structured approaches to contributions and security reporting. No specific community channels (e.g., Discord, Slack) or notable contributors/sponsorships are detailed in the README.

Licensing & Compatibility

The project is licensed under the Apache 2.0 license, aligning with its base model, Qwen/Qwen2.5-Coder-7B-Instruct. This license is generally permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

Performance claims are scoped to the specific Nullsec RC2/v1.1 111-case benchmark and do not guarantee universal vulnerability detection. The system is an aid to security review, not a replacement for human expertise. Source-only checkouts may not immediately reflect artifact-gated claims until release assets are unpacked. Training necessitates a CUDA-capable NVIDIA GPU.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
258 stars in the last 15 days

Explore Similar Projects

Feedback? Help us improve.