Skip to content

Commit 7b6e433

Browse files
chore(release): prepare release v1.1.0 (#5)
Bumped versions for: ast-guard Version analysis and docs updates by Codex AI. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 423bb96 commit 7b6e433

File tree

5 files changed

+38
-1
lines changed

5 files changed

+38
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.0] - 2025-12-11
11+
12+
Hardened ast-guard’s AgentScript preset with additional browser primitive blocks and dynamic import enforcement.
13+
14+
### Updated Libraries
15+
16+
- **ast-guard** v1.1.0 - AgentScript preset now blocks structuredClone/messaging APIs, queueMicrotask, and import() expressions for parity with the Enclave sandbox.
17+
1018
### Changed
1119

1220
- Updated the documented cache directory default for `LocalLlmConfig` to `~/.enclave/models` in `libs/enclave-vm/src/scoring/types.ts:377` to match the new Enclave pathing.

docs/draft/docs/libraries/ast-guard.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ console.log(result.valid); // true
2929
- **Security Presets**: STRICT, SECURE, STANDARD, PERMISSIVE
3030
- **Zero Dependencies**: Only uses acorn for parsing
3131

32+
## AgentScript preset hardening
33+
34+
Use `createAgentScriptPreset()` when you want AST validation to match Enclave's runtime sandbox. The preset now:
35+
36+
- Blocks modern browser primitives like `structuredClone`, `AbortController`/`AbortSignal`, `MessageChannel`/`MessagePort`, `BroadcastChannel`, `TextEncoder`/`TextDecoder`, and `Intl` so those capabilities never reach execution.
37+
- Treats `queueMicrotask` the same way as timers to guard against microtask flooding attacks.
38+
- Reports dynamic `import()` expressions through `NoEvalRule`, preventing untrusted code from lazy-loading modules.
39+
3240
## Security Presets
3341

3442
| Preset | Description |

docs/live/docs/libraries/ast-guard.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ console.log(result.valid); // true
2929
- **Security Presets**: STRICT, SECURE, STANDARD, PERMISSIVE
3030
- **Zero Dependencies**: Only uses acorn for parsing
3131

32+
## AgentScript preset hardening
33+
34+
Use `createAgentScriptPreset()` when you want AST validation to match Enclave's runtime sandbox. The preset now:
35+
36+
- Blocks modern browser primitives like `structuredClone`, `AbortController`/`AbortSignal`, `MessageChannel`/`MessagePort`, `BroadcastChannel`, `TextEncoder`/`TextDecoder`, and `Intl` so those capabilities never reach execution.
37+
- Treats `queueMicrotask` the same way as timers to guard against microtask flooding attacks.
38+
- Reports dynamic `import()` expressions through `NoEvalRule`, preventing untrusted code from lazy-loading modules.
39+
3240
## Security Presets
3341

3442
| Preset | Description |

libs/ast-guard/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
## [1.1.0] - 2025-12-11
6+
7+
### Added
8+
9+
- AgentScript preset now blocks structuredClone, AbortController/AbortSignal, MessageChannel/MessagePort, BroadcastChannel, TextEncoder/TextDecoder, and Intl before code hits runtime (libs/ast-guard/src/presets/agentscript.preset.ts:292).
10+
- AgentScript preset treats queueMicrotask as a disallowed timer primitive to mitigate microtask flooding attacks (libs/ast-guard/src/presets/agentscript.preset.ts:311).
11+
12+
### Security
13+
14+
- NoEvalRule now reports dynamic import() expressions so untrusted code cannot lazy-load modules (libs/ast-guard/src/rules/no-eval.rule.ts:4).
15+
316
All notable changes to this project will be documented in this file.
417

518
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

libs/ast-guard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ast-guard",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "A production-ready AST security guard for JavaScript - validate, protect, and enforce code safety with extensible rules",
55
"author": "AgentFront <info@agentfront.dev>",
66
"homepage": "https://github.com/agentfront/enclave/tree/main/libs/ast-guard",

0 commit comments

Comments
 (0)