Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ To submit your repo for scanning:
- PHP (beta)
- Ruby (beta)
- Zig (beta)
- Swift (beta)

## Credits

Expand Down
2 changes: 1 addition & 1 deletion apps/openant-cli/internal/languages/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestSupportedMatchesConfig(t *testing.T) {
if err != nil {
t.Fatalf("Supported() error: %v", err)
}
want := []string{"c", "go", "javascript", "php", "python", "ruby", "zig"}
want := []string{"c", "go", "javascript", "php", "python", "ruby", "swift", "zig"}
if len(got) != len(want) {
t.Fatalf("Supported() = %v, want %v", got, want)
}
Expand Down
18 changes: 16 additions & 2 deletions config/languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
"dist",
"build",
".git",
"vendor"
"vendor",
".build",
".swiftpm",
"DerivedData",
"Pods",
"Carthage",
"xcuserdata"
],
"extensions": {
".py": "python",
Expand All @@ -29,7 +35,8 @@
".rb": "ruby",
".rake": "ruby",
".php": "php",
".zig": "zig"
".zig": "zig",
".swift": "swift"
},
"languages": {
"python": {
Expand Down Expand Up @@ -92,6 +99,13 @@
"fence": "zig",
"docker_template": null,
"enabled": true
},
"swift": {
"extensions": [".swift"],
"parser": {"mode": "subprocess", "script": "parsers/swift/test_pipeline.py"},
"fence": "swift",
"docker_template": null,
"enabled": true
}
}
}
2 changes: 1 addition & 1 deletion libs/openant-core/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The symlink automatically picks up the new binary. Running `make install` would

# Project Context

This is OpenAnt, a two-stage SAST tool using Claude for vulnerability analysis. Supports Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, and Zig codebases with 4-level cost optimization.
This is OpenAnt, a two-stage SAST tool using Claude for vulnerability analysis. Supports Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, Zig, and Swift codebases with 4-level cost optimization.

**Key files to read after context reset:**
- `DOCUMENTATION.md` - **Start here** - Index of all documentation
Expand Down
2 changes: 1 addition & 1 deletion libs/openant-core/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ OpenAnt documentation is organized into three tiers based on audience and purpos
- **8-Step Pipeline:** Parse → Generate Units → Entry-Point Filter → Application Context → Context Enhancement → Stage 1 Detection → Stage 2 Verification → Dynamic Testing
- **Language-Agnostic Prompts:** The same prompts are used for every supported language
- **Two-Stage Analysis:** Stage 1 detects vulnerabilities, Stage 2 uses attacker simulation to verify exploitability
- **Supported Languages:** Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, and Zig
- **Supported Languages:** Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, Zig, and Swift

### File Naming Conventions

Expand Down
2 changes: 1 addition & 1 deletion libs/openant-core/OPENANT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenAnt Architecture Documentation

OpenAnt is an LLM-powered Static Application Security Testing (SAST) tool that uses a two-stage pipeline for vulnerability analysis with 4-level cost optimization. Supports Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, and Zig.
OpenAnt is an LLM-powered Static Application Security Testing (SAST) tool that uses a two-stage pipeline for vulnerability analysis with 4-level cost optimization. Supports Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, Zig, and Swift.

## Table of Contents

Expand Down
2 changes: 1 addition & 1 deletion libs/openant-core/PIPELINE_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ OpenAnt is a vulnerability analysis tool using Claude. The name "two-stage" refe
| 7 | **Stage 2: Verification** | No | Attacker simulation to confirm exploitability |
| 8 | **Dynamic Testing** | No | Docker-isolated exploit testing (requires Docker) |

**Supported Languages:** Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, and Zig
**Supported Languages:** Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, Zig, and Swift

**Two-Stage Analysis:**
- **Stage 1** asks: "Is this code vulnerable?"
Expand Down
2 changes: 1 addition & 1 deletion libs/openant-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**LLM-Powered Static Application Security Testing**

OpenAnt uses Claude to analyze code for security vulnerabilities through a two-stage pipeline: detection followed by verification. Features 4-level cost optimization with CodeQL integration. Supports Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, and Zig.
OpenAnt uses Claude to analyze code for security vulnerabilities through a two-stage pipeline: detection followed by verification. Features 4-level cost optimization with CodeQL integration. Supports Python, JavaScript/TypeScript, Go, C/C++, Ruby, PHP, Zig, and Swift.

---

Expand Down
14 changes: 14 additions & 0 deletions libs/openant-core/core/parser_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
)
from core.schemas import ParseResult
from utilities.file_io import open_utf8, read_json, write_json
from utilities.prune_telemetry import compute_prune_telemetry

# Root of openant-core (where parsers/ lives)
_CORE_ROOT = Path(__file__).parent.parent
Expand Down Expand Up @@ -559,6 +560,19 @@ def _load_module(name, filename):
dataset["metadata"]["reachability_filter"]["warning"] = _blackout
print(f" [Warning] {_blackout}", file=sys.stderr)

# Per-unit prune telemetry (ADDITIVE, all-language; advisory — must never crash
# the filter). Merges classification keys + the pruned_units.json sidecar; a
# forward-asymmetry warning is recorded only if a blackout warning did not
# already claim the slot. call_graph/reverse_call_graph are the UN-pruned graphs.
_rf = dataset["metadata"]["reachability_filter"]
_pruned_ids = [u.get("id", "") for u in units if u.get("id", "") not in reachable_ids]
_extra, _asym_warning = compute_prune_telemetry(
reachable_ids, sorted(_pruned_ids), call_graph, reverse_call_graph, output_dir)
_rf.update(_extra)
if _asym_warning and "warning" not in _rf:
_rf["warning"] = _asym_warning
print(f" [Warning] {_asym_warning}", file=sys.stderr)

# Warn about unimplemented higher-level filters
if processing_level == "codeql":
print(
Expand Down
Empty file.
Loading
Loading