Skip to content

Commit 44b366e

Browse files
hyperpolymathclaude
andcommitted
chore(floor-raise): add foundational tool integrations
Add AI manifest, Trustfile, Dustfile, and assail recipe as part of the Floor Raise campaign to establish baseline tooling across all repos. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b3eb79e commit 44b366e

9 files changed

Lines changed: 113 additions & 526 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dustfile — Cleanup and Hygiene Contract
3+
4+
[dustfile]
5+
version = "1.0.0"
6+
format = "a2ml"
7+
8+
[cleanup]
9+
stale-branch-policy = "delete-after-merge"
10+
artifact-retention = "90-days"
11+
cache-policy = "clear-on-release"
12+
13+
[hygiene]
14+
linting = "required"
15+
formatting = "required"
16+
dead-code-removal = "encouraged"
17+
todo-tracking = "tracked-in-issues"
18+
19+
[reversibility]
20+
backup-before-destructive = true
21+
rollback-mechanism = "git-revert"
22+
data-retention-policy = "preserve-30-days"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Trustfile — Integrity and Provenance Contract
3+
4+
[trustfile]
5+
version = "1.0.0"
6+
format = "a2ml"
7+
8+
[provenance]
9+
source-control = "git"
10+
forge = "github"
11+
ci-verified = true
12+
signing-policy = "commit-signing-preferred"
13+
14+
[integrity]
15+
spdx-compliant = true
16+
license-audit = "required"
17+
dependency-pinning = "sha-pinned"
18+
19+
[verification]
20+
reproducible-builds = "goal"
21+
sbom-generation = "required"
22+
attestation = "sigstore-preferred"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Feedback-o-Tron Integration — Autonomous Bug Reporting
3+
4+
[integration]
5+
name = "feedback-o-tron"
6+
type = "bug-reporter"
7+
repository = "https://github.com/hyperpolymath/feedback-o-tron"
8+
9+
[reporting-config]
10+
platforms = ["github", "gitlab", "bugzilla"]
11+
deduplication = true
12+
audit-logging = true
13+
auto-file-upstream = "on-external-dependency-failure"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Proven Integration — Formally Verified Safety Library
3+
4+
[integration]
5+
name = "proven"
6+
type = "safety-library"
7+
repository = "https://github.com/hyperpolymath/proven"
8+
version = "1.2.0"
9+
10+
[binding-policy]
11+
approach = "thin-ffi-wrapper"
12+
unsafe-patterns = "replace-with-proven-equivalent"
13+
modules-available = ["SafeMath", "SafeString", "SafeJSON", "SafeURL", "SafeRegex", "SafeSQL", "SafeFile", "SafeTemplate", "SafeCrypto"]
14+
15+
[adoption-guidance]
16+
priority = "high"
17+
scope = "all-string-json-url-crypto-operations"
18+
migration = "incremental — replace unsafe patterns as encountered"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# VeriSimDB Feed — Cross-Repo Analytics Data Store
3+
4+
[integration]
5+
name = "verisimdb"
6+
type = "data-feed"
7+
repository = "https://github.com/hyperpolymath/nextgen-databases"
8+
data-store = "verisimdb-data"
9+
10+
[feed-config]
11+
emit-scan-results = true
12+
emit-build-metrics = true
13+
emit-dependency-graph = true
14+
format = "hexad"
15+
destination = "verisimdb-data/feeds/"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Vexometer Integration — Irritation Surface Analysis
3+
4+
[integration]
5+
name = "vexometer"
6+
type = "friction-measurement"
7+
repository = "https://github.com/hyperpolymath/vexometer"
8+
9+
[measurement-config]
10+
dimensions = 10
11+
emit-isa-reports = true
12+
lazy-eliminator = true
13+
satellite-interventions = true
14+
15+
[hooks]
16+
cli-tools = "measure-on-error"
17+
ui-panels = "measure-on-interaction"
18+
build-failures = "measure-on-failure"

Justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,3 +460,7 @@ edit:
460460
build-riscv:
461461
@echo "Building for RISC-V..."
462462
cross build --target riscv64gc-unknown-linux-gnu
463+
464+
# Run panic-attacker pre-commit scan
465+
assail:
466+
@command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"

README.adoc

Lines changed: 1 addition & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,5 @@
11
= http-capability-gateway
2-
Jonathan Jewell <jonathan@formdb.org>
3-
:toc:
2+
:toc: preamble
43
:icons: font
5-
:sectnums:
64

7-
== Overview
85

9-
http-capability-gateway is a lightweight, policy-driven HTTP governance layer
10-
that enforces a declarative, auditable model of HTTP verb exposure in front of
11-
existing services.
12-
13-
This project introduces a minimal viable implementation of a new category:
14-
a capability gateway for HTTP. It does not replace nginx or Apache. Instead,
15-
it governs what they are allowed to do.
16-
17-
The gateway loads a Verb Governance Spec (DSL v1), validates it, compiles it
18-
into fast enforcement rules, and applies those rules to real HTTP traffic.
19-
Every decision is logged in structured form for audit and introspection.
20-
21-
== Why This Exists
22-
23-
Modern systems expose HTTP methods inconsistently and often accidentally.
24-
DELETE, PUT, PATCH, OPTIONS, and even HEAD can leak capabilities or create
25-
attack surface when left unmanaged.
26-
27-
Traditional reverse proxies do not provide:
28-
29-
* per-verb governance
30-
* narrative or provenance
31-
* reversible policy artefacts
32-
* trust-aware verb exposure
33-
* structured constraints
34-
* intentional stealthing or deception
35-
36-
http-capability-gateway introduces a principled, schema-driven approach to
37-
HTTP method governance without disrupting existing infrastructure.
38-
39-
== MVP Scope
40-
41-
The MVP focuses on the smallest coherent loop:
42-
43-
1. Load a Verb Governance Spec from disk
44-
2. Validate it against a top-level schema
45-
3. Compile it into fast, matchable rules
46-
4. Enforce those rules on real HTTP traffic
47-
5. Emit structured logs for every decision
48-
49-
No trust engine, no dynamic scoring, no control plane, no FormBD integration.
50-
Those will grow around this core in later phases.
51-
52-
== Verb Governance Spec (DSL v1)
53-
54-
The DSL defines:
55-
56-
* global verb rules
57-
* route-specific overrides
58-
* stealth profiles
59-
* narrative metadata
60-
61-
Example:
62-
63-
[source,yaml]
64-
----
65-
service:
66-
name: ledger-api
67-
version: 1
68-
environment: dev
69-
70-
verbs:
71-
GET: { exposure: public }
72-
POST: { exposure: authenticated }
73-
DELETE: { exposure: internal }
74-
75-
routes:
76-
- path: /accounts
77-
verbs:
78-
DELETE:
79-
exposure: internal
80-
narrative: "Account deletion requires internal trust."
81-
82-
stealth:
83-
profiles:
84-
limited:
85-
unauthenticated: 405
86-
untrusted: 404
87-
88-
narrative:
89-
purpose: "Define safe verb exposure for ledger operations."
90-
----
91-
92-
== Architecture (MVP)
93-
94-
[source,ascii]
95-
----
96-
Policy File (DSL)
97-
|
98-
v
99-
Policy Loader → Validator → Compiler
100-
|
101-
v
102-
Gateway (Elixir)
103-
|
104-
v
105-
HTTP Traffic → Enforcement → JSON Logs
106-
----
107-
108-
== Running the Gateway
109-
110-
* Install Elixir
111-
* Clone the repository
112-
* Provide a policy file under `config/policy.yaml`
113-
* Start the gateway:
114-
115-
[source,bash]
116-
----
117-
mix run --no-halt
118-
----
119-
120-
== Performance Optimisations (v1.0.0)
121-
122-
=== Tiered ETS Lookup
123-
124-
Policy lookups use a three-tier strategy that eliminates full-table scans:
125-
126-
* **Tier 1 — Exact Path (O(1))**: Literal route patterns (no regex metacharacters) are stored with `{:exact, path, verb}` ETS keys. A direct hash lookup resolves 90%+ of requests instantly.
127-
* **Tier 2 — Regex Routes (O(r))**: Patterns containing regex metacharacters are tested only against other regex routes, not the entire table.
128-
* **Tier 3 — Global Rules (O(1))**: If no route matches, a final `{:global, verb}` lookup catches global verb defaults.
129-
130-
For a 1000-route policy, this reduces from ~1000 regex evaluations per request to 1 hash lookup (typical case) or ~50 regex evaluations (edge case).
131-
132-
=== Security Headers
133-
134-
All responses (including health/metrics endpoints) include OWASP-recommended security headers:
135-
136-
* `X-Content-Type-Options: nosniff` — prevent MIME-type sniffing
137-
* `X-Frame-Options: DENY` — prevent clickjacking
138-
* `Referrer-Policy: strict-origin-when-cross-origin` — limit referrer leakage
139-
* `Cache-Control: no-store, no-cache, must-revalidate` — prevent caching of policy decisions
140-
* `Connection: close` — prevent connection reuse across trust boundaries
141-
142-
== Roadmap
143-
144-
=== Phase 2
145-
* Rate limits
146-
* Expanded stealth profiles
147-
* Hot policy reloads
148-
149-
=== Phase 3
150-
* Control plane
151-
* FormBD integration for provenance
152-
* Distributed gateways
153-
154-
=== Phase 4
155-
* V-based data plane
156-
* Agent introspection
157-
* Constraint engine
158-
* FQLdt proofs
159-
160-
== Philosophy
161-
162-
This project treats governance as a first-class engineering concern.
163-
Policies are artefacts. Artefacts are reversible. Decisions have provenance.
164-
HTTP verbs become capabilities, not accidents.
165-
166-
== License
167-
168-
PMPL-1.0-or-later (Palimpsest License)

0 commit comments

Comments
 (0)