Skip to content

feat(js): Guard v0.8 feature parity - config, rules, registry, history, CLI#22

Merged
AgentSeal merged 10 commits intomainfrom
dev/js-guard-v08
Mar 25, 2026
Merged

feat(js): Guard v0.8 feature parity - config, rules, registry, history, CLI#22
AgentSeal merged 10 commits intomainfrom
dev/js-guard-v08

Conversation

@AgentSeal
Copy link
Copy Markdown
Owner

Full JS/TS feature parity with Python Guard v0.8. After this, npx agentseal guard works the same as the Python CLI.

Four new modules built from scratch: project-config for .agentseal.yaml loading and validation with directory walk-up resolution, registry-client for trust score enrichment from agentseal.org with Cloudflare-compatible User-Agent, rules engine for YAML community rules with glob matching and inline self-tests, and history store backed by better-sqlite3 for delta scanning between runs.

Security hardening ported from Python: 80+ TR39 confusable character mappings to catch homoglyph attacks, HTML entity decoding, 2-pass deobfuscation pipeline, 12 canonical seed hashes in the blocklist with union-on-load to prevent seed loss, 5 new supply chain checks for bunx/deno/docker/pip/go unpinned packages, URL and headers added to baseline fingerprints so endpoint swaps get detected, and 3 markdown image exfiltration patterns.

The guard CLI command supports all the flags from Python: --fail-on for CI exit code control, --rules for custom YAML rules, --config for explicit project config, --from-json to re-render saved reports, --no-registry and --no-diff for offline/fast mode, --reset-baselines, and terminal/json/sarif output formats. Guard init generates a starter .agentseal.yaml and guard test validates custom rules.

better-sqlite3 is an optional dependency. If it fails to install (no native toolchain), history and delta features silently disable. Everything else works.

8 commits, 942 tests (38 files), triple-verified, clean build.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 25, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​types/​better-sqlite3@​7.6.131001007181100
Addednpm/​better-sqlite3@​12.8.010010010089100
Addednpm/​yaml@​2.8.39910010092100

View full report

Guard.run() now integrates all v0.8 modules:
- Project config resolution (.agentseal.yaml)
- Custom YAML rule engine evaluation on skills, MCPs, agents
- Registry enrichment via agentseal.org bulk-check API
- History save + delta computation via SQLite
- Unlisted agent/MCP findings (GUARD-001, GUARD-002)
- ignore_paths filtering before skill scanning
- ignore_findings filtering after scanning
- fromJson early return for loading saved reports

Guard.run() is now async (returns Promise<GuardReport>).
New GuardOptions: config, noRegistry, noDiff, rulesPaths, fromJson, failOn.
Existing guard tests updated to await the async run().
@AgentSeal AgentSeal merged commit 99cee31 into main Mar 25, 2026
5 checks passed
@AgentSeal AgentSeal deleted the dev/js-guard-v08 branch March 25, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant