Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f4243b4
Initial plan
Copilot Mar 2, 2026
78d863d
feat: add experimental bridge-aot package with AOT compiler for bridg…
Copilot Mar 2, 2026
5258061
docs: add AOT assessment and benchmark test (7.4x speedup)
Copilot Mar 2, 2026
5eb461f
refactor: address code review feedback - extract AsyncFunction helper…
Copilot Mar 2, 2026
b30a3a0
feat(bridge-aot): add catch fallbacks, force statements, ToolDef supp…
Copilot Mar 2, 2026
c01fd14
chore: remove accidentally committed build artifacts, update .gitignore
Copilot Mar 2, 2026
0d8d272
refactor(bridge-aot): address code review feedback
Copilot Mar 2, 2026
fffd8a7
fix(bridge-aot): pass context as second argument to tool calls
Copilot Mar 2, 2026
a765f6b
test(bridge-aot): add shared data-driven test suite for runtime/AOT p…
Copilot Mar 2, 2026
5cdd373
feat(bridge-aot): add support for const blocks, expressions, string i…
Copilot Mar 2, 2026
a2efa30
feat(bridge-aot): add pipe operators, root array output, nested array…
Copilot Mar 2, 2026
4a64575
docs(bridge-aot): update ASSESSMENT.md with 30+ supported features
Copilot Mar 2, 2026
f09af4e
refactor(bridge-aot): address code review feedback
Copilot Mar 2, 2026
30cb7f5
refactor: rename bridge-aot to core-native, move shared tests to brid…
Copilot Mar 3, 2026
8a42272
feat(core-native): add define block support
Copilot Mar 3, 2026
25689e1
feat(core-native): add alias declarations, overdefinition support
Copilot Mar 3, 2026
a3c98f8
feat(core-native): add break/continue in array mapping, fix null arra…
Copilot Mar 3, 2026
c5c5575
docs(core-native): update ASSESSMENT.md with all implemented features
Copilot Mar 3, 2026
5729874
fix(core-native): nested array control flow and fallback bypass bugs
Copilot Mar 3, 2026
c520499
refactor: rename bridge-compiler to bridge-parser, core-native to bri…
Copilot Mar 3, 2026
97a13a6
fix: remove unused variable, fix build
Copilot Mar 3, 2026
48b2067
fix: update CHANGELOG title and consistent test counts in ASSESSMENT
Copilot Mar 3, 2026
90edb2c
threat model
aarne Mar 3, 2026
4623ca8
fix: Lint
aarne Mar 3, 2026
25f46e5
fix: Astro needs parser resolver
aarne Mar 3, 2026
dde630a
fix: rethrow
aarne Mar 3, 2026
2d1bb74
fix: Lint
aarne Mar 3, 2026
20ddc82
Small fixes
aarne Mar 3, 2026
8c40b96
docs: Readme
aarne Mar 3, 2026
1abed18
Initial article .... not ready
aarne Mar 3, 2026
62be32b
Connected full test suite
aarne Mar 3, 2026
cfe845b
fix: implement all missing codegen features for 32 skipped compiler t…
Copilot Mar 3, 2026
d47394b
fix: resolve all 31 skipped compiler tests — full language parity
Copilot Mar 3, 2026
0ff12d0
Bugfixes and update to blog
aarne Mar 3, 2026
8767884
fix: lint
aarne Mar 3, 2026
252cbd6
fix: add error cause to bridge compilation failure
aarne Mar 3, 2026
23e013c
Preparing to release
aarne Mar 3, 2026
6183b7f
fix: add security notes and lgtm annotations to codegen
aarne Mar 3, 2026
79be9c6
feat: add CodeQL configuration and workflow for security analysis
aarne Mar 3, 2026
f0fcfc1
Feature parity
aarne Mar 3, 2026
87f9d57
fix: Lint
aarne Mar 3, 2026
1ec213a
Docs
aarne Mar 3, 2026
035eb94
Docs
aarne Mar 3, 2026
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
8 changes: 8 additions & 0 deletions .changeset/rename-parser-and-compiler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@stackables/bridge-parser": minor
"@stackables/bridge-compiler": major
---

Rename `@stackables/bridge-compiler` to `@stackables/bridge-parser` (parser, serializer, language service). The new `@stackables/bridge-compiler` package compiles BridgeDocument into optimized JavaScript code with abort signal support, tool timeout, and full language feature parity.

bridge-parser first release will continue from current bridge-compiler version 1.0.6. New version of bridge-compiler will jump to 2.0.0 to mark a breaking change in the package purpose
15 changes: 15 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CodeQL Configuration
#
# The bridge-compiler package IS an AOT compiler — its codegen.ts file
# generates JavaScript source strings from a fully-parsed, validated
# Bridge AST. This is the core purpose of the package, not a security flaw.
#
# CodeQL's js/code-injection query correctly flags dynamic code construction
# as a pattern worth reviewing; after review the usage in these files is
# intentional and safe. No raw external / user input is ever spliced into
# the generated output — all interpolated values originate from deterministic
# AST walks over a Chevrotain-parsed, type-checked document.

paths-ignore:
- packages/bridge-compiler/src/codegen.ts
- packages/bridge-compiler/build/**
42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "CodeQL Advanced"

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "27 2 * * 3"

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ coverage
packages/*/lcov.info
profiles/
isolate-*.log

# Build artifacts that may land in src/ during cross-package compilation
packages/*/src/**/*.js
packages/*/src/**/*.d.ts
packages/*/src/**/*.d.ts.map
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The Bridge engine parses your wiring diagram, builds a dependency graph, and exe

- [See our roadmap](https://github.com/stackables/bridge/milestones)
- [Feedback in the discussions](https://github.com/stackables/bridge/discussions/1)
- [Performance report](./docs/performance.md)
- [Performance report - interpreter](./packages/bridge-core/performance.md)
- [Performance report - compiler](./packages/bridge-compiler/performance.md)

### How it looks

Expand Down
41 changes: 26 additions & 15 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Security Policy

Security is a top priority for us, especially since it functions as an egress gateway handling sensitive context (like API keys) and routing HTTP traffic.
Security is a top priority for us, especially since The Bridge functions as an egress gateway handling sensitive context (like API keys) and routing HTTP traffic.

## Supported Versions

Please note that The Bridge is currently in **Developer Preview (v1.x)**.
| Package | Version | Supported | Notes |
| ----------------------------- | ------- | ------------------ | ---------------------------------------------------- |
| `@stackables/bridge` | 2.x.x | :white_check_mark: | Umbrella package — recommended for most users |
| `@stackables/bridge-core` | 1.x.x | :white_check_mark: | Execution engine |
| `@stackables/bridge-parser` | 1.x.x | :white_check_mark: | Parser & language service |
| `@stackables/bridge-compiler` | 2.x.x | :warning: | AOT compiler — pre-stable, API may change |
| `@stackables/bridge-stdlib` | 1.x.x | :white_check_mark: | Standard library tools (`httpCall`, strings, arrays) |
| `@stackables/bridge-graphql` | 1.x.x | :white_check_mark: | GraphQL schema adapter |
| `@stackables/bridge-types` | 1.x.x | :white_check_mark: | Shared type definitions |
| `bridge-syntax-highlight` | 1.x.x | :white_check_mark: | VS Code extension |

While we take security seriously and patch vulnerabilities as quickly as possible, v1.x is a public preview and is **not recommended for production use**. We will introduce strict security patch backporting starting with our stable v2.0.0 release.

| Version | Supported | Notes |
| --- | --- | --- |
| 1.x.x | :white_check_mark: | Active Developer Preview. Patches applied to latest minor/patch. |
Security patches are applied to the latest minor/patch of each supported major version.

## Reporting a Vulnerability

Expand All @@ -20,21 +25,27 @@ If you discover a security vulnerability within The Bridge, please report it at

Please include the following in your report:

* A description of the vulnerability and its impact.
* Steps to reproduce the issue (a minimal `.bridge` file and GraphQL query is highly appreciated).
* Any potential mitigation or fix you might suggest.
- A description of the vulnerability and its impact.
- Steps to reproduce the issue (a minimal `.bridge` file and GraphQL query is highly appreciated).
- Any potential mitigation or fix you might suggest.

We will acknowledge receipt of your vulnerability report within 48 hours and strive to send you regular updates about our progress.

## Scope & Threat Model

For a comprehensive analysis of trust boundaries, attack surfaces, and mitigations across all packages, see our full [Security Threat Model](docs/threat-model.md).

Because The Bridge evaluates `.bridge` files and executes HTTP requests, we are particularly interested in reports concerning:

* **Credential Leakage:** Bugs that could cause secrets injected via `context` to be exposed in unauthorized logs, traces, or unmapped GraphQL responses.
* **Engine Escapes / RCE:** Vulnerabilities where a malicious `.bridge` file or dynamic input could break out of the engine sandbox and execute arbitrary code on the host.
* **SSRF (Server-Side Request Forgery):** Unexpected ways dynamic input could manipulate the `httpCall` tool to query internal network addresses not explicitly defined in the `.bridge` topology.
- **Credential Leakage:** Bugs that could cause secrets injected via `context` to be exposed in unauthorized logs, traces, or unmapped GraphQL responses.
- **Engine Escapes / RCE:** Vulnerabilities where a malicious `.bridge` file or dynamic input could break out of the engine sandbox and execute arbitrary code on the host. This includes the AOT compiler (`bridge-compiler`) which uses `new AsyncFunction()` for code generation.
- **SSRF (Server-Side Request Forgery):** Unexpected ways dynamic input could manipulate the `httpCall` tool to query internal network addresses not explicitly defined in the `.bridge` topology.
- **Prototype Pollution:** Bypasses of the `UNSAFE_KEYS` blocklist (`__proto__`, `constructor`, `prototype`) in `setNested`, `applyPath`, or `lookupToolFn`.
- **Cache Poisoning:** Cross-tenant data leakage through the `httpCall` response cache.
- **Playground Abuse:** Vulnerabilities in the browser-based playground or share API that could lead to data exfiltration or resource exhaustion.

**Out of Scope:**

* Hardcoding API keys directly into `.bridge` files or GraphQL schemas and committing them to version control. (This is a user configuration error, not an engine vulnerability).
* Writing bridge files that send sensitive info from the context to malicious server deliberately (Writing insecure instructions is not a crime)
- Hardcoding API keys directly into `.bridge` files or GraphQL schemas and committing them to version control. (This is a user configuration error, not an engine vulnerability.)
- Writing bridge files that send sensitive info from the context to a malicious server deliberately. (Writing insecure instructions is not a framework vulnerability.)
- GraphQL query depth / complexity attacks — these must be mitigated at the GraphQL server layer (Yoga/Apollo), not within The Bridge engine.
Loading