Skip to content

Commit f0850f9

Browse files
Zie619claude
andcommitted
docs: update README with Agent SDKs, Cedar policy gate, VS Code extension, GitLab CI
- Add Agent SDKs section with Python/TypeScript/Go install + quick start examples - Add Cedar policy gate section with example .cedar policy - Add VS Code extension section - Add GitLab CI include template - Add badges for trusera-sdk on PyPI and npm - Update nav links Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c4c86e3 commit f0850f9

File tree

1 file changed

+89
-1
lines changed

1 file changed

+89
-1
lines changed

README.md

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
<a href="https://github.com/Trusera/ai-bom/stargazers"><img src="https://img.shields.io/github/stars/Trusera/ai-bom?style=social" alt="GitHub Stars" /></a>
1010
<a href="https://pypi.org/project/ai-bom/"><img src="https://img.shields.io/pypi/v/ai-bom.svg" alt="PyPI" /></a>
1111
<a href="https://pypi.org/project/ai-bom/"><img src="https://img.shields.io/pypi/dm/ai-bom.svg" alt="PyPI Downloads" /></a>
12-
<a href="https://www.npmjs.com/package/n8n-nodes-trusera"><img src="https://img.shields.io/npm/v/n8n-nodes-trusera.svg" alt="npm" /></a>
12+
<a href="https://www.npmjs.com/package/n8n-nodes-trusera"><img src="https://img.shields.io/npm/v/n8n-nodes-trusera.svg" alt="npm n8n" /></a>
13+
<a href="https://pypi.org/project/trusera-sdk/"><img src="https://img.shields.io/pypi/v/trusera-sdk.svg?label=trusera-sdk" alt="PyPI SDK" /></a>
14+
<a href="https://www.npmjs.com/package/trusera-sdk"><img src="https://img.shields.io/npm/v/trusera-sdk.svg?label=trusera-sdk" alt="npm SDK" /></a>
1315
<img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+" />
1416
<img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License" />
1517
<img src="https://img.shields.io/badge/CycloneDX-1.6-green.svg" alt="CycloneDX 1.6" />
@@ -20,12 +22,15 @@
2022

2123
<p>
2224
<a href="#quick-start">Quick Start</a> &nbsp;|&nbsp;
25+
<a href="#agent-sdks">Agent SDKs</a> &nbsp;|&nbsp;
2326
<a href="#n8n-community-node">n8n Node</a> &nbsp;|&nbsp;
2427
<a href="#what-it-finds">What It Finds</a> &nbsp;|&nbsp;
2528
<a href="#comparison">Comparison</a> &nbsp;|&nbsp;
2629
<a href="#architecture">Architecture</a> &nbsp;|&nbsp;
2730
<a href="#output-formats">Output Formats</a> &nbsp;|&nbsp;
2831
<a href="#cicd-integration">CI/CD</a> &nbsp;|&nbsp;
32+
<a href="#cedar-policy-gate">Cedar Policy</a> &nbsp;|&nbsp;
33+
<a href="#vs-code-extension">VS Code</a> &nbsp;|&nbsp;
2934
<a href="#scan-levels">Scan Levels</a> &nbsp;|&nbsp;
3035
<a href="#dashboard">Dashboard</a>
3136
</p>
@@ -107,6 +112,38 @@ The image is published to `ghcr.io/trusera/ai-bom` on every tagged release.
107112

108113
</details>
109114

115+
## Agent SDKs
116+
117+
Runtime monitoring SDKs for AI agents — intercept HTTP calls, evaluate Cedar policies, and track events in real time.
118+
119+
| Language | Package | Install |
120+
|----------|---------|---------|
121+
| **Python** | [`trusera-sdk`](https://pypi.org/project/trusera-sdk/) | `pip install trusera-sdk` |
122+
| **TypeScript** | [`trusera-sdk`](https://www.npmjs.com/package/trusera-sdk) | `npm install trusera-sdk` |
123+
| **Go** | [`trusera-sdk-go`](trusera-sdk-go/) | `go get github.com/Trusera/ai-bom/trusera-sdk-go` |
124+
125+
```python
126+
# Python — 3 lines to monitor any agent
127+
from trusera_sdk import TruseraClient
128+
129+
client = TruseraClient(api_key="tsk_...", agent_id="my-agent")
130+
client.track_event("llm_call", {"model": "gpt-4o", "tokens": 150})
131+
```
132+
133+
```typescript
134+
// TypeScript — transparent HTTP interception
135+
import { TruseraClient, TruseraInterceptor } from "trusera-sdk";
136+
137+
const client = new TruseraClient({ apiKey: "tsk_..." });
138+
const interceptor = new TruseraInterceptor();
139+
interceptor.install(client, { enforcement: "warn" });
140+
// All fetch() calls are now monitored
141+
```
142+
143+
**Framework integrations:** LangChain, CrewAI, AutoGen (Python) | LangChain.js (TypeScript)
144+
145+
See [docs/interceptor-sdks.md](docs/interceptor-sdks.md) for the full guide.
146+
110147
## n8n Community Node
111148

112149
Scan all your n8n workflows for AI security risks — directly inside n8n. One node, full dashboard.
@@ -342,6 +379,19 @@ jobs:
342379

343380
</details>
344381

382+
### GitLab CI
383+
384+
```yaml
385+
include:
386+
- remote: 'https://raw.githubusercontent.com/Trusera/ai-bom/main/templates/gitlab-ci-ai-bom.yml'
387+
388+
variables:
389+
AI_BOM_FAIL_ON: "high"
390+
AI_BOM_DEEP_SCAN: "true"
391+
```
392+
393+
See [templates/gitlab-ci-ai-bom.yml](templates/gitlab-ci-ai-bom.yml) for the full template.
394+
345395
### Policy enforcement
346396

347397
```bash
@@ -350,6 +400,9 @@ ai-bom scan . --fail-on critical --quiet
350400
351401
# Use a YAML policy file for fine-grained control
352402
ai-bom scan . --policy .ai-bom-policy.yml --quiet
403+
404+
# Cedar policy gate (see Cedar Policy Gate section)
405+
python3 scripts/cedar-gate.py scan-results.json .cedar/ai-policy.cedar
353406
```
354407

355408
```yaml
@@ -422,6 +475,41 @@ ai-bom scan . --n8n-url http://localhost:5678 --n8n-api-key YOUR_KEY
422475

423476
Detects AI Agent nodes, MCP client connections, webhook triggers without auth, dangerous tool combinations, and hardcoded credentials in workflow JSON.
424477

478+
## Cedar Policy Gate
479+
480+
Enforce fine-grained security rules on discovered AI components using Cedar-like policies. Fails the CI pipeline if any component violates a rule.
481+
482+
```cedar
483+
// .cedar/ai-policy.cedar
484+
forbid (principal, action, resource)
485+
when { resource.severity == "critical" };
486+
487+
forbid (principal, action, resource)
488+
when { resource.component_type == "api_key" };
489+
490+
permit (principal, action, resource);
491+
```
492+
493+
```yaml
494+
# GitHub Actions
495+
- uses: trusera/ai-bom@main
496+
with:
497+
policy-gate: "true"
498+
cedar-policy-file: ".cedar/ai-policy.cedar"
499+
```
500+
501+
Also available as a [GitLab CI template](templates/gitlab-ci-ai-bom.yml). See [docs/ci-integration.md](docs/ci-integration.md) for details.
502+
503+
## VS Code Extension
504+
505+
Scan your workspace for AI components directly from VS Code. Inline diagnostics, severity decorations, and a results tree view.
506+
507+
```
508+
ext install trusera.ai-bom-scanner
509+
```
510+
511+
The extension runs `ai-bom scan` on your workspace and displays findings as VS Code diagnostics with severity-based gutter decorations.
512+
425513
## Contributing
426514
427515
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.

0 commit comments

Comments
 (0)