guardian-runtime-assurance 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- guardian_runtime_assurance-0.4.1/.github/workflows/ci.yml +79 -0
- guardian_runtime_assurance-0.4.1/.github/workflows/release.yml +179 -0
- guardian_runtime_assurance-0.4.1/CHANGELOG.md +47 -0
- guardian_runtime_assurance-0.4.1/CITATION.cff +12 -0
- guardian_runtime_assurance-0.4.1/Dockerfile +8 -0
- guardian_runtime_assurance-0.4.1/LICENSE +21 -0
- guardian_runtime_assurance-0.4.1/MANIFEST.in +12 -0
- guardian_runtime_assurance-0.4.1/Makefile +44 -0
- guardian_runtime_assurance-0.4.1/PKG-INFO +508 -0
- guardian_runtime_assurance-0.4.1/README.md +484 -0
- guardian_runtime_assurance-0.4.1/SECURITY.md +7 -0
- guardian_runtime_assurance-0.4.1/assets/social/github-social-card-guardian-agent-runtime.png +0 -0
- guardian_runtime_assurance-0.4.1/configs/benchmarks/reference.yaml +8 -0
- guardian_runtime_assurance-0.4.1/configs/capabilities/reference.yaml +207 -0
- guardian_runtime_assurance-0.4.1/configs/guardian/aggressive.yaml +81 -0
- guardian_runtime_assurance-0.4.1/configs/guardian/hardened.yaml +77 -0
- guardian_runtime_assurance-0.4.1/configs/guardian/initial.yaml +67 -0
- guardian_runtime_assurance-0.4.1/configs/guardian/overfit.yaml +75 -0
- guardian_runtime_assurance-0.4.1/docs/architecture.md +30 -0
- guardian_runtime_assurance-0.4.1/docs/benchmark.md +48 -0
- guardian_runtime_assurance-0.4.1/docs/implementation-2026-11-04.md +94 -0
- guardian_runtime_assurance-0.4.1/docs/independent-review-2026-11-05.md +32 -0
- guardian_runtime_assurance-0.4.1/docs/limitations.md +54 -0
- guardian_runtime_assurance-0.4.1/docs/method.md +15 -0
- guardian_runtime_assurance-0.4.1/docs/migration-0.4.md +67 -0
- guardian_runtime_assurance-0.4.1/docs/publication-status.md +45 -0
- guardian_runtime_assurance-0.4.1/docs/release-0.4.0.md +38 -0
- guardian_runtime_assurance-0.4.1/docs/release-0.4.1.md +47 -0
- guardian_runtime_assurance-0.4.1/docs/reproducibility.md +40 -0
- guardian_runtime_assurance-0.4.1/docs/research_questions.md +10 -0
- guardian_runtime_assurance-0.4.1/docs/responsible_disclosure.md +5 -0
- guardian_runtime_assurance-0.4.1/docs/safety.md +13 -0
- guardian_runtime_assurance-0.4.1/docs/threat_model.md +43 -0
- guardian_runtime_assurance-0.4.1/docs/verification.md +54 -0
- guardian_runtime_assurance-0.4.1/experiments/__init__.py +0 -0
- guardian_runtime_assurance-0.4.1/experiments/attack_suite.py +8 -0
- guardian_runtime_assurance-0.4.1/experiments/baseline_comparison.py +4 -0
- guardian_runtime_assurance-0.4.1/experiments/figure_output.py +45 -0
- guardian_runtime_assurance-0.4.1/experiments/latency_benchmark.py +141 -0
- guardian_runtime_assurance-0.4.1/experiments/negative_results.py +160 -0
- guardian_runtime_assurance-0.4.1/experiments/run_reference_suite.py +387 -0
- guardian_runtime_assurance-0.4.1/experiments/self_hardening.py +8 -0
- guardian_runtime_assurance-0.4.1/experiments/tamper_detection.py +9 -0
- guardian_runtime_assurance-0.4.1/formal/check_model.py +316 -0
- guardian_runtime_assurance-0.4.1/formal/guardian.cfg +9 -0
- guardian_runtime_assurance-0.4.1/formal/guardian.tla +186 -0
- guardian_runtime_assurance-0.4.1/pyproject.toml +82 -0
- guardian_runtime_assurance-0.4.1/requirements-dev.txt +1 -0
- guardian_runtime_assurance-0.4.1/requirements.lock +33 -0
- guardian_runtime_assurance-0.4.1/requirements.txt +15 -0
- guardian_runtime_assurance-0.4.1/results/checksums.sha256 +13 -0
- guardian_runtime_assurance-0.4.1/results/dependency_inventory.json +350 -0
- guardian_runtime_assurance-0.4.1/results/figures/attack_success_by_architecture.png +0 -0
- guardian_runtime_assurance-0.4.1/results/figures/benign_completion_by_architecture.png +0 -0
- guardian_runtime_assurance-0.4.1/results/figures/hardening_bypass_elimination.png +0 -0
- guardian_runtime_assurance-0.4.1/results/figures/safety_utility_frontier.png +0 -0
- guardian_runtime_assurance-0.4.1/results/figures/tampering_detection_by_architecture.png +0 -0
- guardian_runtime_assurance-0.4.1/results/generated_regressions.json +122 -0
- guardian_runtime_assurance-0.4.1/results/hardening_history.json +356 -0
- guardian_runtime_assurance-0.4.1/results/negative_results.json +26 -0
- guardian_runtime_assurance-0.4.1/results/reference_summary.json +410 -0
- guardian_runtime_assurance-0.4.1/results/runs.json +15102 -0
- guardian_runtime_assurance-0.4.1/results/runtime_manifest.json +23 -0
- guardian_runtime_assurance-0.4.1/results/sbom.spdx.json +526 -0
- guardian_runtime_assurance-0.4.1/scripts/checksum_artifacts.py +28 -0
- guardian_runtime_assurance-0.4.1/scripts/dependency_inventory.py +150 -0
- guardian_runtime_assurance-0.4.1/scripts/generate_sbom.py +110 -0
- guardian_runtime_assurance-0.4.1/scripts/showcase.py +144 -0
- guardian_runtime_assurance-0.4.1/scripts/verify_distribution.py +118 -0
- guardian_runtime_assurance-0.4.1/setup.cfg +4 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/__init__.py +1 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/adversarial/__init__.py +25 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/adversarial/attacks.py +507 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/adversarial/hardening.py +272 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/agent/__init__.py +4 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/agent/protocol.py +23 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/agent/scripted.py +66 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/baselines.py +55 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/canonical.py +150 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/capabilities/__init__.py +15 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/capabilities/core.py +425 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/crypto.py +46 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/evaluation/__init__.py +3 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/evaluation/metrics.py +57 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/evidence/__init__.py +15 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/evidence/log.py +388 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/factory.py +134 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/guardian/__init__.py +3 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/guardian/monitor.py +266 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/jsonutil.py +96 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/manifest.py +38 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/policy/__init__.py +21 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/policy/engine.py +597 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/resources/__init__.py +1 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/resources/benchmarks/reference.yaml +8 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/resources/capabilities/reference.yaml +207 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/resources/guardian/aggressive.yaml +81 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/resources/guardian/hardened.yaml +77 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/resources/guardian/initial.yaml +67 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/resources/guardian/overfit.yaml +75 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/simulator/__init__.py +4 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/simulator/mission.py +138 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/simulator/sandbox.py +153 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/telemetry.py +30 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/tools/__init__.py +3 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/tools/gateway.py +197 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/types.py +92 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/verifier/__init__.py +3 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/verifier/_output.py +7 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/verifier/cli.py +54 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/verifier/manifest_cli.py +56 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime/yamlutil.py +50 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime_assurance.egg-info/PKG-INFO +508 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime_assurance.egg-info/SOURCES.txt +146 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime_assurance.egg-info/dependency_links.txt +1 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime_assurance.egg-info/entry_points.txt +3 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime_assurance.egg-info/requires.txt +11 -0
- guardian_runtime_assurance-0.4.1/src/guardian_runtime_assurance.egg-info/top_level.txt +1 -0
- guardian_runtime_assurance-0.4.1/tests/adversarial/test_attack_suite.py +24 -0
- guardian_runtime_assurance-0.4.1/tests/adversarial/test_benchmark_integrity.py +105 -0
- guardian_runtime_assurance-0.4.1/tests/adversarial/test_negative_results.py +14 -0
- guardian_runtime_assurance-0.4.1/tests/integration/test_execution_integrity.py +320 -0
- guardian_runtime_assurance-0.4.1/tests/integration/test_guardian_runtime.py +443 -0
- guardian_runtime_assurance-0.4.1/tests/properties/test_generated_properties.py +32 -0
- guardian_runtime_assurance-0.4.1/tests/properties/test_hypothesis_properties.py +167 -0
- guardian_runtime_assurance-0.4.1/tests/properties/test_sequence_properties.py +13 -0
- guardian_runtime_assurance-0.4.1/tests/regression/test_hardening_regressions.py +28 -0
- guardian_runtime_assurance-0.4.1/tests/regression/test_independent_release_review.py +327 -0
- guardian_runtime_assurance-0.4.1/tests/regression/test_runtime_integrity_review.py +256 -0
- guardian_runtime_assurance-0.4.1/tests/test_reproducibility.py +122 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_authority_validation.py +235 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_capabilities.py +263 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_distribution_identity.py +47 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_evidence.py +104 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_evidence_boundaries.py +205 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_factory_validation.py +39 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_figure_output.py +49 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_formal_model.py +16 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_jsonutil.py +39 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_latency_benchmark.py +37 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_manifest.py +19 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_manipulated_agent.py +35 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_packaged_resources.py +18 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_policy.py +213 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_showcase.py +36 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_telemetry.py +38 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_verifier_cli.py +82 -0
- guardian_runtime_assurance-0.4.1/tests/unit/test_verifier_limits.py +39 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_call:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
vulnerability-audit:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
- uses: pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266 # v1.1.0
|
|
20
|
+
with:
|
|
21
|
+
inputs: requirements.lock
|
|
22
|
+
no-deps: true
|
|
23
|
+
|
|
24
|
+
test:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
strategy:
|
|
27
|
+
matrix:
|
|
28
|
+
python-version: ["3.12", "3.13", "3.14"]
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
31
|
+
with:
|
|
32
|
+
persist-credentials: false
|
|
33
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
34
|
+
with:
|
|
35
|
+
python-version: ${{ matrix.python-version }}
|
|
36
|
+
cache: pip
|
|
37
|
+
cache-dependency-path: requirements.lock
|
|
38
|
+
- run: python -m pip install --no-deps -r requirements.lock
|
|
39
|
+
- run: python -m pip install --no-deps --no-build-isolation -e .
|
|
40
|
+
- run: python -m pip check
|
|
41
|
+
- run: python -m ruff check src tests experiments scripts formal
|
|
42
|
+
- run: python -m mypy src/guardian_runtime
|
|
43
|
+
- run: python -m pytest
|
|
44
|
+
- run: python formal/check_model.py
|
|
45
|
+
- if: matrix.python-version == '3.12'
|
|
46
|
+
name: Model-check TLA+ specification
|
|
47
|
+
run: |
|
|
48
|
+
curl --fail --location --silent --show-error \
|
|
49
|
+
https://github.com/tlaplus/tlaplus/releases/download/v1.7.4/tla2tools.jar \
|
|
50
|
+
--output /tmp/tla2tools.jar
|
|
51
|
+
echo "bee4a54f3ee3d4afc347c3240ec2d9e93b075104 /tmp/tla2tools.jar" | sha1sum --check --strict
|
|
52
|
+
java -XX:+UseParallelGC -cp /tmp/tla2tools.jar tlc2.TLC \
|
|
53
|
+
-deadlock -workers 1 -config formal/guardian.cfg formal/guardian.tla
|
|
54
|
+
- run: python -m experiments.attack_suite
|
|
55
|
+
- if: matrix.python-version == '3.12'
|
|
56
|
+
run: |
|
|
57
|
+
python -m experiments.run_reference_suite
|
|
58
|
+
git diff --exit-code -- results
|
|
59
|
+
- if: matrix.python-version == '3.12'
|
|
60
|
+
name: Verify isolated installed distribution
|
|
61
|
+
run: |
|
|
62
|
+
python -m pip wheel . --no-deps --no-build-isolation -w dist
|
|
63
|
+
python -c 'from setuptools.build_meta import build_sdist; build_sdist("dist")'
|
|
64
|
+
python scripts/verify_distribution.py dist/*.whl dist/*.tar.gz
|
|
65
|
+
|
|
66
|
+
macos:
|
|
67
|
+
runs-on: macos-latest
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
70
|
+
with:
|
|
71
|
+
persist-credentials: false
|
|
72
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
73
|
+
with:
|
|
74
|
+
python-version: "3.14"
|
|
75
|
+
- run: python -m pip install --no-deps -r requirements.lock
|
|
76
|
+
- run: python -m pip install --no-deps --no-build-isolation -e .
|
|
77
|
+
- run: python -m pip check
|
|
78
|
+
- run: make check
|
|
79
|
+
- run: python scripts/showcase.py
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "release/v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: release-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
verify:
|
|
17
|
+
name: Verify exact release commit
|
|
18
|
+
uses: ./.github/workflows/ci.yml
|
|
19
|
+
|
|
20
|
+
build:
|
|
21
|
+
needs: verify
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
outputs:
|
|
24
|
+
distribution: ${{ steps.version.outputs.distribution }}
|
|
25
|
+
version: ${{ steps.version.outputs.version }}
|
|
26
|
+
tag: ${{ steps.version.outputs.tag }}
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
persist-credentials: false
|
|
32
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.14"
|
|
35
|
+
- name: Validate reviewed release ref
|
|
36
|
+
id: version
|
|
37
|
+
shell: bash
|
|
38
|
+
run: |
|
|
39
|
+
set -euo pipefail
|
|
40
|
+
VERSION="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
|
|
41
|
+
python -c 'import re,sys; assert re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+",sys.argv[1])' "$VERSION"
|
|
42
|
+
DISTRIBUTION="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["name"])')"
|
|
43
|
+
test "$DISTRIBUTION" = "guardian-runtime-assurance"
|
|
44
|
+
test "$GITHUB_REF_NAME" = "release/v${VERSION}"
|
|
45
|
+
git fetch origin main
|
|
46
|
+
git merge-base --is-ancestor "$GITHUB_SHA" origin/main
|
|
47
|
+
if git ls-remote --exit-code --tags origin "refs/tags/v${VERSION}" >/dev/null 2>&1; then
|
|
48
|
+
echo 'Release tag already exists; refusing to replace it.' >&2
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
echo "distribution=$DISTRIBUTION" >> "$GITHUB_OUTPUT"
|
|
52
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
53
|
+
echo "tag=v$VERSION" >> "$GITHUB_OUTPUT"
|
|
54
|
+
- name: Build and test exact distributions
|
|
55
|
+
shell: bash
|
|
56
|
+
run: |
|
|
57
|
+
set -euo pipefail
|
|
58
|
+
python -m pip install --no-deps -r requirements.lock
|
|
59
|
+
python -m pip wheel . --no-deps --no-build-isolation -w dist
|
|
60
|
+
python -c 'from setuptools.build_meta import build_sdist; build_sdist("dist")'
|
|
61
|
+
mkdir -p proof
|
|
62
|
+
python scripts/verify_distribution.py dist/*.whl dist/*.tar.gz --report proof/distribution.json
|
|
63
|
+
python -m venv /tmp/guardian-metadata-check
|
|
64
|
+
/tmp/guardian-metadata-check/bin/python -m pip install 'twine>=6,<7'
|
|
65
|
+
/tmp/guardian-metadata-check/bin/python -m twine check --strict dist/*
|
|
66
|
+
git archive --format=zip --output=proof/guardian-source.zip HEAD
|
|
67
|
+
sha256sum dist/* proof/guardian-source.zip > proof/SHA256SUMS.txt
|
|
68
|
+
VERSION="${{ steps.version.outputs.version }}"
|
|
69
|
+
cp "docs/release-${VERSION}.md" proof/RELEASE_NOTES.md
|
|
70
|
+
printf '%s\n' "$GITHUB_SHA" > proof/COMMIT.txt
|
|
71
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
72
|
+
with:
|
|
73
|
+
name: release-dist
|
|
74
|
+
path: dist/*
|
|
75
|
+
if-no-files-found: error
|
|
76
|
+
retention-days: 90
|
|
77
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
78
|
+
with:
|
|
79
|
+
name: release-proof
|
|
80
|
+
path: proof/*
|
|
81
|
+
if-no-files-found: error
|
|
82
|
+
retention-days: 90
|
|
83
|
+
|
|
84
|
+
github-release:
|
|
85
|
+
name: Publish verified GitHub release
|
|
86
|
+
needs: build
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
permissions:
|
|
89
|
+
contents: write
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
92
|
+
with:
|
|
93
|
+
name: release-dist
|
|
94
|
+
path: dist
|
|
95
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
96
|
+
with:
|
|
97
|
+
name: release-proof
|
|
98
|
+
path: proof
|
|
99
|
+
- name: Create immutable-version release
|
|
100
|
+
env:
|
|
101
|
+
GH_TOKEN: ${{ github.token }}
|
|
102
|
+
RELEASE_TAG: ${{ needs.build.outputs.tag }}
|
|
103
|
+
run: |
|
|
104
|
+
gh release create "$RELEASE_TAG" dist/* proof/* \
|
|
105
|
+
--repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" \
|
|
106
|
+
--title "Guardian Agent Runtime $RELEASE_TAG" \
|
|
107
|
+
--notes-file proof/RELEASE_NOTES.md --latest
|
|
108
|
+
|
|
109
|
+
publish-pypi:
|
|
110
|
+
name: Publish to PyPI
|
|
111
|
+
needs: build
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
environment:
|
|
114
|
+
name: pypi
|
|
115
|
+
url: https://pypi.org/project/guardian-runtime-assurance/
|
|
116
|
+
permissions:
|
|
117
|
+
id-token: write
|
|
118
|
+
steps:
|
|
119
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
120
|
+
with:
|
|
121
|
+
name: release-dist
|
|
122
|
+
path: dist
|
|
123
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
124
|
+
|
|
125
|
+
verify-pypi:
|
|
126
|
+
name: Verify published PyPI distributions
|
|
127
|
+
needs: [build, publish-pypi]
|
|
128
|
+
runs-on: ubuntu-latest
|
|
129
|
+
permissions:
|
|
130
|
+
contents: read
|
|
131
|
+
steps:
|
|
132
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
133
|
+
with:
|
|
134
|
+
persist-credentials: false
|
|
135
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
136
|
+
with:
|
|
137
|
+
python-version: "3.14"
|
|
138
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
139
|
+
with:
|
|
140
|
+
name: release-dist
|
|
141
|
+
path: expected-dist
|
|
142
|
+
- name: Download public files and compare published hashes
|
|
143
|
+
env:
|
|
144
|
+
VERSION: ${{ needs.build.outputs.version }}
|
|
145
|
+
DISTRIBUTION: ${{ needs.build.outputs.distribution }}
|
|
146
|
+
run: |
|
|
147
|
+
python - <<'PY'
|
|
148
|
+
import hashlib,json,os,time,urllib.request
|
|
149
|
+
from pathlib import Path
|
|
150
|
+
version=os.environ['VERSION'];distribution=os.environ['DISTRIBUTION']
|
|
151
|
+
for attempt in range(12):
|
|
152
|
+
try:
|
|
153
|
+
with urllib.request.urlopen(f'https://pypi.org/pypi/{distribution}/{version}/json',timeout=30) as response:
|
|
154
|
+
metadata=json.load(response)
|
|
155
|
+
break
|
|
156
|
+
except Exception:
|
|
157
|
+
if attempt==11:
|
|
158
|
+
raise
|
|
159
|
+
time.sleep(10)
|
|
160
|
+
files={item['filename']:item for item in metadata['urls']}
|
|
161
|
+
output=Path('public-dist');output.mkdir()
|
|
162
|
+
for expected in Path('expected-dist').iterdir():
|
|
163
|
+
item=files[expected.name]
|
|
164
|
+
digest=hashlib.sha256(expected.read_bytes()).hexdigest()
|
|
165
|
+
assert item['digests']['sha256']==digest, expected.name
|
|
166
|
+
with urllib.request.urlopen(item['url'],timeout=30) as response:
|
|
167
|
+
data=response.read()
|
|
168
|
+
assert hashlib.sha256(data).hexdigest()==digest, expected.name
|
|
169
|
+
(output/expected.name).write_bytes(data)
|
|
170
|
+
print('Public PyPI distribution hashes match the reviewed build.')
|
|
171
|
+
PY
|
|
172
|
+
- name: Test isolated public installation
|
|
173
|
+
run: python scripts/verify_distribution.py public-dist/*.whl public-dist/*.tar.gz --report public-verification.json
|
|
174
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
175
|
+
with:
|
|
176
|
+
name: public-pypi-verification
|
|
177
|
+
path: public-verification.json
|
|
178
|
+
if-no-files-found: error
|
|
179
|
+
retention-days: 90
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
- Publish under `guardian-runtime-assurance`; the `guardian-agent-runtime` PyPI
|
|
6
|
+
project belongs to unrelated software and was never this repository's release.
|
|
7
|
+
- Keep the repository, `guardian_runtime` import and verifier commands unchanged.
|
|
8
|
+
- Validate wheel and sdist Name/Version metadata and the installed distribution.
|
|
9
|
+
- Bind dependency inventory and SBOM package identity to pyproject metadata.
|
|
10
|
+
- Select version-specific release notes and verify the correct public PyPI project.
|
|
11
|
+
- Preserve the original 0.4.0 GitHub tag, packages and review evidence.
|
|
12
|
+
- Runtime behaviour and benchmark scenarios are unchanged.
|
|
13
|
+
|
|
14
|
+
## 0.4.0
|
|
15
|
+
|
|
16
|
+
A newly applicable first-match allow rule now invalidates an older permit and
|
|
17
|
+
requires fresh authorization. The 58-case independent suite covers timing,
|
|
18
|
+
budgets, replay, evidence, malformed results and input validation. All prior
|
|
19
|
+
0.4 candidate corrections are retained.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 0.4.0rc1
|
|
23
|
+
|
|
24
|
+
Unpublished review candidate prepared in November 2026.
|
|
25
|
+
|
|
26
|
+
### Authority and execution
|
|
27
|
+
|
|
28
|
+
- Own capability and policy snapshots, including nested constraints and collections.
|
|
29
|
+
- Return detached capability, policy and audit records rather than writable internal aliases.
|
|
30
|
+
- Preserve JSON boolean types in scalar, enum, exclusion and delegation comparisons.
|
|
31
|
+
- Bound permits by their authorizing rule's expiry and recheck current restrictions before execution.
|
|
32
|
+
- Retain one-way nonce, invocation, rate and resource reservations without charging twice.
|
|
33
|
+
- Validate and copy tool results; malformed outputs produce a failed audited result with a burned permit.
|
|
34
|
+
- Detach nested manifest input before signing.
|
|
35
|
+
|
|
36
|
+
### Verification
|
|
37
|
+
|
|
38
|
+
- Upgrade locked setuptools to 84.1.0 and Pillow to 13.0.0 after the current vulnerability audit identified advisories in the earlier pins. The audit remains a required check.
|
|
39
|
+
|
|
40
|
+
- Bound verifier file reads and reject excess JSON nesting before decoder allocation.
|
|
41
|
+
- Repair the Makefile's interpreter selection so local checks match CI's module invocation.
|
|
42
|
+
- Add synthetic regressions, an eight-case offline demonstration and isolated wheel/sdist verification.
|
|
43
|
+
- Add macOS checks alongside the Linux Python-version matrix.
|
|
44
|
+
- Normalise PNG encoding without changing Agg pixels; retain exact artifact equality and add pixel-level tests.
|
|
45
|
+
- Regenerate reference artifacts and record the changed compromised-key experiment without hiding remaining trust limits.
|
|
46
|
+
|
|
47
|
+
No merge, tag, GitHub release or package-index publication is performed by this candidate.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use or adapt this software, please cite it."
|
|
3
|
+
title: "Guardian Agent Runtime"
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: Kaczmarek
|
|
7
|
+
given-names: Sylvester
|
|
8
|
+
year: 2026
|
|
9
|
+
license: MIT
|
|
10
|
+
repository-code: "https://github.com/sylvesterkaczmarek/guardian-agent-runtime"
|
|
11
|
+
url: "https://github.com/sylvesterkaczmarek/guardian-agent-runtime"
|
|
12
|
+
version: 0.4.1
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
WORKDIR /work
|
|
3
|
+
COPY requirements.lock pyproject.toml ./
|
|
4
|
+
RUN python -m pip install --no-cache-dir --no-deps -r requirements.lock
|
|
5
|
+
COPY . /work
|
|
6
|
+
RUN python -m pip install --no-cache-dir --no-deps --no-build-isolation -e .
|
|
7
|
+
RUN python -m pip check
|
|
8
|
+
CMD ["make", "test"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sylvester Kaczmarek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
include CHANGELOG.md LICENSE README.md CITATION.cff SECURITY.md Makefile Dockerfile
|
|
2
|
+
include requirements.txt requirements-dev.txt requirements.lock
|
|
3
|
+
recursive-include docs *.md
|
|
4
|
+
recursive-include configs *.yaml
|
|
5
|
+
recursive-include tests *.py
|
|
6
|
+
recursive-include experiments *.py
|
|
7
|
+
recursive-include scripts *.py
|
|
8
|
+
recursive-include formal *.py *.tla *.cfg
|
|
9
|
+
recursive-include results *.json *.sha256 *.png
|
|
10
|
+
prune results/local
|
|
11
|
+
recursive-include assets *.png
|
|
12
|
+
recursive-include .github/workflows *.yml
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.PHONY: install test lint typecheck formal check benchmark reproduce verify-reproduce latency sbom package
|
|
2
|
+
|
|
3
|
+
install:
|
|
4
|
+
python -m pip install --no-deps -r requirements.lock
|
|
5
|
+
python -m pip install --no-deps --no-build-isolation -e .
|
|
6
|
+
python -m pip check
|
|
7
|
+
|
|
8
|
+
test:
|
|
9
|
+
python -m pytest
|
|
10
|
+
|
|
11
|
+
lint:
|
|
12
|
+
python -m ruff check src tests experiments scripts formal
|
|
13
|
+
|
|
14
|
+
typecheck:
|
|
15
|
+
python -m mypy src/guardian_runtime
|
|
16
|
+
|
|
17
|
+
formal:
|
|
18
|
+
python formal/check_model.py
|
|
19
|
+
|
|
20
|
+
check: lint typecheck test formal
|
|
21
|
+
|
|
22
|
+
benchmark:
|
|
23
|
+
python -m experiments.attack_suite
|
|
24
|
+
|
|
25
|
+
reproduce:
|
|
26
|
+
python -m experiments.run_reference_suite
|
|
27
|
+
|
|
28
|
+
verify-reproduce:
|
|
29
|
+
@set -eu; before=$$(mktemp); trap 'rm -f "$$before"' EXIT; \
|
|
30
|
+
cp results/checksums.sha256 "$$before"; \
|
|
31
|
+
python -m experiments.run_reference_suite; \
|
|
32
|
+
diff -u "$$before" results/checksums.sha256
|
|
33
|
+
|
|
34
|
+
latency:
|
|
35
|
+
python -m experiments.latency_benchmark
|
|
36
|
+
|
|
37
|
+
sbom:
|
|
38
|
+
python scripts/dependency_inventory.py results/dependency_inventory.json
|
|
39
|
+
python scripts/generate_sbom.py results/sbom.spdx.json
|
|
40
|
+
|
|
41
|
+
package:
|
|
42
|
+
rm -rf dist
|
|
43
|
+
python -m pip wheel . --no-deps --no-build-isolation -w dist
|
|
44
|
+
python scripts/checksum_artifacts.py dist
|