shirudo-python 0.1.0rc1__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.
Files changed (55) hide show
  1. shirudo_python-0.1.0rc1/.github/workflows/release-check.yml +43 -0
  2. shirudo_python-0.1.0rc1/.github/workflows/status-evidence.yml +79 -0
  3. shirudo_python-0.1.0rc1/.github/workflows/upstream-compatibility.yml +71 -0
  4. shirudo_python-0.1.0rc1/CONTRIBUTING.md +37 -0
  5. shirudo_python-0.1.0rc1/LICENSE +24 -0
  6. shirudo_python-0.1.0rc1/MANIFEST.in +10 -0
  7. shirudo_python-0.1.0rc1/PKG-INFO +71 -0
  8. shirudo_python-0.1.0rc1/README.md +58 -0
  9. shirudo_python-0.1.0rc1/docs/decisions/0001-offline-status-summary.md +35 -0
  10. shirudo_python-0.1.0rc1/docs/decisions/0002-full-status-report.md +56 -0
  11. shirudo_python-0.1.0rc1/docs/decisions/0003-conformance-ownership.md +19 -0
  12. shirudo_python-0.1.0rc1/docs/ecosystem.md +53 -0
  13. shirudo_python-0.1.0rc1/docs/evidence.md +115 -0
  14. shirudo_python-0.1.0rc1/docs/full-status.md +95 -0
  15. shirudo_python-0.1.0rc1/docs/release.md +104 -0
  16. shirudo_python-0.1.0rc1/docs/releases/0.1.0rc1.md +32 -0
  17. shirudo_python-0.1.0rc1/docs/rust-onboarding.md +24 -0
  18. shirudo_python-0.1.0rc1/docs/status.md +67 -0
  19. shirudo_python-0.1.0rc1/docs/summary-conformance.md +35 -0
  20. shirudo_python-0.1.0rc1/docs/upstream-compatibility.md +39 -0
  21. shirudo_python-0.1.0rc1/docs/upstream-proposal.md +49 -0
  22. shirudo_python-0.1.0rc1/examples/support_summary.py +28 -0
  23. shirudo_python-0.1.0rc1/pyproject.toml +21 -0
  24. shirudo_python-0.1.0rc1/setup.cfg +4 -0
  25. shirudo_python-0.1.0rc1/shirudo_python/__init__.py +24 -0
  26. shirudo_python-0.1.0rc1/shirudo_python/_reader.py +215 -0
  27. shirudo_python-0.1.0rc1/shirudo_python/_summary.py +101 -0
  28. shirudo_python-0.1.0rc1/shirudo_python/py.typed +0 -0
  29. shirudo_python-0.1.0rc1/shirudo_python/report.py +204 -0
  30. shirudo_python-0.1.0rc1/shirudo_python.egg-info/PKG-INFO +71 -0
  31. shirudo_python-0.1.0rc1/shirudo_python.egg-info/SOURCES.txt +53 -0
  32. shirudo_python-0.1.0rc1/shirudo_python.egg-info/dependency_links.txt +1 -0
  33. shirudo_python-0.1.0rc1/shirudo_python.egg-info/top_level.txt +1 -0
  34. shirudo_python-0.1.0rc1/tests/__init__.py +1 -0
  35. shirudo_python-0.1.0rc1/tests/fixtures/README.md +21 -0
  36. shirudo_python-0.1.0rc1/tests/fixtures/full-synthetic.json +85 -0
  37. shirudo_python-0.1.0rc1/tests/fixtures/summary-v1.json +292 -0
  38. shirudo_python-0.1.0rc1/tests/fixtures/target-ok.json +21 -0
  39. shirudo_python-0.1.0rc1/tests/fixtures/upstream/operator.json +1 -0
  40. shirudo_python-0.1.0rc1/tests/fixtures/upstream/target-boot.json +1 -0
  41. shirudo_python-0.1.0rc1/tests/fixtures/upstream/target-inventory.json +1 -0
  42. shirudo_python-0.1.0rc1/tests/fixtures/upstream/target-loaded.json +1 -0
  43. shirudo_python-0.1.0rc1/tests/fixtures/upstream/target-unloaded.json +1 -0
  44. shirudo_python-0.1.0rc1/tests/fixtures/upstream/uninitialized.json +1 -0
  45. shirudo_python-0.1.0rc1/tests/test_conformance.py +52 -0
  46. shirudo_python-0.1.0rc1/tests/test_report.py +241 -0
  47. shirudo_python-0.1.0rc1/tests/test_status.py +97 -0
  48. shirudo_python-0.1.0rc1/tests/test_support_example.py +27 -0
  49. shirudo_python-0.1.0rc1/tests/test_upstream_reports.py +115 -0
  50. shirudo_python-0.1.0rc1/tools/capture-package-status.sh +20 -0
  51. shirudo_python-0.1.0rc1/tools/capture-vm-status.sh +48 -0
  52. shirudo_python-0.1.0rc1/tools/check_upstream_status.py +156 -0
  53. shirudo_python-0.1.0rc1/tools/release-check.py +160 -0
  54. shirudo_python-0.1.0rc1/tools/release-requirements.txt +6 -0
  55. shirudo_python-0.1.0rc1/tools/test_upstream_status.py +87 -0
@@ -0,0 +1,43 @@
1
+ name: Release rehearsal
2
+ on:
3
+ workflow_call:
4
+ push:
5
+ tags: ['v*']
6
+ workflow_dispatch:
7
+ inputs:
8
+ candidate_tag:
9
+ description: Optional tag to match against project.version
10
+ required: false
11
+ type: string
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ distributions:
18
+ runs-on: ubuntu-24.04
19
+ steps:
20
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21
+ with:
22
+ persist-credentials: false
23
+ fetch-depth: 0
24
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
25
+ with:
26
+ python-version: '3.12.16'
27
+ - run: |
28
+ python -m pip install --require-hashes --only-binary=:all: -r tools/release-requirements.txt
29
+ - name: Build, compare and test distributions
30
+ env:
31
+ TAG: ${{ github.ref_type == 'tag' && github.ref_name || inputs.candidate_tag }}
32
+ run: |
33
+ args=(--out "$RUNNER_TEMP/release-dist")
34
+ if [[ -n "$TAG" ]]; then args+=(--tag "$TAG"); fi
35
+ python tools/release-check.py "${args[@]}"
36
+ cat "$RUNNER_TEMP/release-dist/SHA256SUMS" >> "$GITHUB_STEP_SUMMARY"
37
+ - name: Retain verified distributions for maintainers
38
+ if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag'
39
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
40
+ with:
41
+ name: distributions-${{ github.sha }}
42
+ path: ${{ runner.temp }}/release-dist/
43
+ if-no-files-found: error
@@ -0,0 +1,79 @@
1
+ name: Upstream status evidence
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ original_package:
7
+ description: Also replay the original Actions package while its artifact is available
8
+ type: boolean
9
+ default: false
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ vm:
16
+ runs-on: ubuntu-24.04
17
+ timeout-minutes: 100
18
+ steps:
19
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20
+ with:
21
+ persist-credentials: false
22
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23
+ with:
24
+ repository: shirudo-dev/shirudo
25
+ ref: dbdb125edbdf2cc83344669cd50f8c07d723668a
26
+ path: upstream
27
+ persist-credentials: false
28
+ - name: Prepare the official VM host on the disposable runner
29
+ working-directory: upstream
30
+ run: |
31
+ testing/vm/kernel-artifact.sh download
32
+ KERNEL_CI_ARTIFACT_DIR="$PWD/build/kernel-ci-artifact" .github/scripts/tests.sh setup
33
+ - name: Capture reports
34
+ working-directory: upstream
35
+ run: |
36
+ . build/vm-toolchain.env
37
+ export BPF_VMLINUX_BTF="$PWD/artifacts/bpf-next-kernel-debs/vmlinux.btf"
38
+ sudo prlimit --pid "$$" --memlock=unlimited:unlimited
39
+ bash ../tools/capture-vm-status.sh "$RUNNER_TEMP/status-reports"
40
+ - name: Replay host states with the VM bundle's source-built binary
41
+ working-directory: upstream
42
+ run: |
43
+ bash ../tools/capture-package-status.sh \
44
+ "$PWD/build/test-vm/host-bundle-bpf-next-verity/root/usr/local/bin/shirudo" \
45
+ "$RUNNER_TEMP/host-reports"
46
+ cp "$RUNNER_TEMP/host-reports/"*.json "$RUNNER_TEMP/status-reports/"
47
+ - name: Preserve reports emitted before completion
48
+ if: always()
49
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
50
+ with:
51
+ name: vm-status
52
+ path: ${{ runner.temp }}/status-reports/*.json
53
+ if-no-files-found: warn
54
+ retention-days: 30
55
+
56
+ packaged:
57
+ if: inputs.original_package
58
+ runs-on: ubuntu-24.04
59
+ timeout-minutes: 10
60
+ steps:
61
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
62
+ with:
63
+ persist-credentials: false
64
+ - name: Fetch the static target package from the upstream build
65
+ env:
66
+ GH_TOKEN: ${{ github.token }}
67
+ run: |
68
+ gh api repos/shirudo-dev/shirudo/actions/artifacts/15233157097/zip > packages.zip
69
+ echo '832ccb6cd6a0516508ff7e95d1de4270fe55527a824c37efbc62a57e7449c069 packages.zip' | sha256sum --check
70
+ unzip -q packages.zip -d packages
71
+ dpkg-deb -x packages/shirudo-target_*.deb target
72
+ - name: Capture before and after upstream key generation
73
+ run: bash tools/capture-package-status.sh "$PWD/target/usr/bin/shirudo" "$PWD/reports"
74
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
75
+ with:
76
+ name: packaged-status
77
+ path: reports/*.json
78
+ if-no-files-found: error
79
+ retention-days: 30
@@ -0,0 +1,71 @@
1
+ name: Upstream status compatibility
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '23 5 * * 1'
6
+ workflow_dispatch:
7
+ inputs:
8
+ candidate:
9
+ description: Full upstream commit SHA (leave empty for Shirudo main)
10
+ required: false
11
+ type: string
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ compatibility:
18
+ if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
19
+ runs-on: ubuntu-24.04
20
+ timeout-minutes: 10
21
+ steps:
22
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23
+ with:
24
+ ref: ${{ github.sha }}
25
+ persist-credentials: false
26
+ - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
27
+ with:
28
+ python-version: '3.12'
29
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30
+ with:
31
+ repository: culvert-labs/shirudo-go
32
+ ref: f776921c61112a5b3416e324dbe4cef3875eac48
33
+ path: .go-reference
34
+ persist-credentials: false
35
+ - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
36
+ with:
37
+ go-version-file: .go-reference/go.mod
38
+ cache: false
39
+ - name: Replay pinned genuine reports and shared conformance vectors
40
+ run: python -m unittest -v tests.test_upstream_reports tests.test_conformance
41
+ - name: Replay canonical vectors and all six original reports in Go
42
+ env:
43
+ SHIRUDO_CONFORMANCE_DIR: ${{ github.workspace }}/tests/fixtures
44
+ run: |
45
+ cp tests/fixtures/summary-v1.json .go-reference/testdata/conformance/summary-v1.json
46
+ go -C .go-reference test -count=1 ./status -run '^TestSharedConformance$'
47
+ - name: Check current upstream status sources and documented example
48
+ id: probe
49
+ env:
50
+ CANDIDATE: ${{ inputs.candidate }}
51
+ shell: bash
52
+ run: |
53
+ set -eo pipefail
54
+ printf 'Python SDK `%s`, Go SDK `%s`\n\n' "$GITHUB_SHA" "$(git -C .go-reference rev-parse HEAD)" >> "$GITHUB_STEP_SUMMARY"
55
+ python -m tools.check_upstream_status --candidate "$CANDIDATE" \
56
+ --go-case "$RUNNER_TEMP/candidate-case.json" | tee -a "$GITHUB_STEP_SUMMARY"
57
+ if grep -q '^Review requested\.' "$GITHUB_STEP_SUMMARY"; then
58
+ echo "::warning::Watched upstream status files changed. Review the run summary."
59
+ fi
60
+ - name: Compare both Go entry points with the Python bounded summary
61
+ if: ${{ !cancelled() && steps.probe.outcome != 'skipped' }}
62
+ shell: bash
63
+ run: |
64
+ set -eo pipefail
65
+ if [[ ! -f "$RUNNER_TEMP/candidate-case.json" ]]; then
66
+ echo "Candidate example unavailable for Go replay." >> "$GITHUB_STEP_SUMMARY"
67
+ exit 1
68
+ fi
69
+ cp "$RUNNER_TEMP/candidate-case.json" .go-reference/testdata/conformance/summary-v1.json
70
+ go -C .go-reference test -count=1 ./status -run '^TestSharedConformance$' 2>&1 | sed 's/^/Go: /'
71
+ echo "Go Parse and Decode matched Python's bounded-summary outcome on the candidate example." >> "$GITHUB_STEP_SUMMARY"
@@ -0,0 +1,37 @@
1
+ # Contributing
2
+
3
+ Use an issue or pull request in this repository to report a bug, propose a
4
+ feature, or discuss a compatibility change. Include the upstream revision
5
+ when reporting a difference in output. Use a synthetic or redacted report
6
+ when sharing host data.
7
+
8
+ ## Run the tests
9
+
10
+ From the repository root, run the following command with Python 3.10 or newer.
11
+ The suite uses the standard library and checked-in fixtures. It runs offline
12
+ without a Shirudo installation or a TPM.
13
+
14
+ ```sh
15
+ python -m unittest discover -s tests -v
16
+ ```
17
+
18
+ GitHub Actions also builds the distribution, installs the wheel and runs the
19
+ suite against that installation outside the checkout on Linux, Windows
20
+ and macOS. Linux covers each supported Python minor. The Python 3.12
21
+ Linux job also checks package annotations with
22
+ `python -m mypy --strict --python-version 3.10 shirudo_python` using
23
+ `mypy==1.19.1` as a development tool.
24
+
25
+ The source distribution includes the offline fixtures and reproduction
26
+ scripts. CI extracts that archive and runs its tests. Use the
27
+ [capture guide](docs/evidence.md) to reproduce producer output in a disposable
28
+ environment. Label hand-built inputs as synthetic and record the source
29
+ revision, capture command and byte digest for genuine reports.
30
+
31
+ ## Propose a change
32
+
33
+ Describe the use case and include a test for the behavior. For format changes,
34
+ link the upstream producer or specification at a commit and document how
35
+ older reports behave. Record decisions about public APIs, dependencies and
36
+ compatibility in `docs/decisions/`. Keep changes small enough that upstream
37
+ maintainers can review them independently.
@@ -0,0 +1,24 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2026, KidCarmi
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,10 @@
1
+ include CONTRIBUTING.md
2
+ recursive-include examples *.py
3
+ recursive-include docs *.md
4
+ recursive-include tests *.py *.json *.md
5
+ include tools/capture-*.sh
6
+ include .github/workflows/status-evidence.yml
7
+ include .github/workflows/upstream-compatibility.yml
8
+ include .github/workflows/release-check.yml
9
+ include tools/check_upstream_status.py tools/test_upstream_status.py
10
+ include tools/release-check.py tools/release-requirements.txt
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: shirudo-python
3
+ Version: 0.1.0rc1
4
+ Summary: Read Shirudo host status reports in Python
5
+ Author: shirudo-python contributors
6
+ License-Expression: BSD-2-Clause
7
+ Project-URL: Repository, https://github.com/culvert-labs/shirudo-python
8
+ Project-URL: Issues, https://github.com/culvert-labs/shirudo-python/issues
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Dynamic: license-file
13
+
14
+ # shirudo-python
15
+
16
+ [![CI](https://github.com/culvert-labs/shirudo-python/actions/workflows/ci.yml/badge.svg)](https://github.com/culvert-labs/shirudo-python/actions/workflows/ci.yml)
17
+
18
+ Read a saved `shirudo status --json` report in Python. Use `parse_status()`
19
+ for the host and verdict, or `parse_status_report()` to inspect the diagnostic
20
+ conditions, measurement state, keyrings, counters and loaded upatches that
21
+ explain the verdict. Both run offline with the Python standard library.
22
+
23
+ This is an independent, unofficial community extension of [Shirudo](https://github.com/shirudo-dev/shirudo), hosted in the `culvert-labs` GitHub organization.
24
+ Development takes place in public here. The small API and documented upstream
25
+ format make individual changes easy for upstream maintainers to evaluate for adoption.
26
+
27
+ ## Try it
28
+
29
+ For the first release candidate, see the [0.1.0rc1 notes and wheel installation](docs/releases/0.1.0rc1.md).
30
+
31
+ From a checkout, install with Python 3.10 or newer in your virtual environment.
32
+
33
+ ```sh
34
+ git clone https://github.com/culvert-labs/shirudo-python.git
35
+ cd shirudo-python
36
+ python -m pip install .
37
+ ```
38
+
39
+ Inspect the report captured after loading a signed test upatch in the official
40
+ VM. Run this example from the repository root.
41
+
42
+ ```python
43
+ from pathlib import Path
44
+ from shirudo_python import parse_status_report
45
+
46
+ report = parse_status_report(Path("tests/fixtures/upstream/target-loaded.json").read_bytes())
47
+ print(report.summary.status) # ok
48
+ print([patch.name for patch in report.upatches_loaded]) # ['basic']
49
+ ```
50
+
51
+ To use a real report, capture it on a Shirudo host with
52
+ `shirudo status --json > status.json`, then read that file in the same way.
53
+ The verdict comes from the report's producer. Use upstream attestation tooling
54
+ when you need to establish the state of a remote host.
55
+
56
+ ## Documentation and development
57
+
58
+ - [Status API](docs/status.md) covers the fields, accepted inputs and errors.
59
+ - [Shared summary profile](docs/summary-conformance.md) documents bounded summary parsing and the Python/Go conformance vectors.
60
+ - [Full report guide](docs/full-status.md) shows how to inspect a report and distinguish omitted fields from null values.
61
+ - [Full report compatibility decision](docs/decisions/0002-full-status-report.md) maps the model to the upstream producer, tests and format history.
62
+ - [Capture evidence](docs/evidence.md) records the upstream revision, official VM workflow, report hashes and limits of the observations.
63
+ - [Upstream proposal](docs/upstream-proposal.md) describes the operator use case, maintenance strategy and possible adoption paths.
64
+ - [Initial design decision](docs/decisions/0001-offline-status-summary.md) records the compatibility baseline and scope.
65
+ - [Contributing](CONTRIBUTING.md) explains how to run the offline tests and propose changes.
66
+ - [BSD 2-Clause license](LICENSE) covers this project.
67
+ - [Ecosystem roadmap](docs/ecosystem.md) connects operator requirements, upstream contributions and the work planned across the SDKs.
68
+ - [Rust onboarding contract](docs/rust-onboarding.md) explains how an independent implementation can demonstrate compatibility.
69
+ - [Upstream changes](docs/upstream-compatibility.md) explains the weekly check and how to triage a changed producer.
70
+ - [Release rehearsal](docs/release.md) covers reproducible wheels and source distributions, registry ownership and the handoff to a future crate maintainer.
71
+ - [Support summary example](examples/support_summary.py) reads a saved report on stdin and prints alerts, loaded names and counter totals. See the [operator walkthrough](docs/ecosystem.md#using-the-support-summary).
@@ -0,0 +1,58 @@
1
+ # shirudo-python
2
+
3
+ [![CI](https://github.com/culvert-labs/shirudo-python/actions/workflows/ci.yml/badge.svg)](https://github.com/culvert-labs/shirudo-python/actions/workflows/ci.yml)
4
+
5
+ Read a saved `shirudo status --json` report in Python. Use `parse_status()`
6
+ for the host and verdict, or `parse_status_report()` to inspect the diagnostic
7
+ conditions, measurement state, keyrings, counters and loaded upatches that
8
+ explain the verdict. Both run offline with the Python standard library.
9
+
10
+ This is an independent, unofficial community extension of [Shirudo](https://github.com/shirudo-dev/shirudo), hosted in the `culvert-labs` GitHub organization.
11
+ Development takes place in public here. The small API and documented upstream
12
+ format make individual changes easy for upstream maintainers to evaluate for adoption.
13
+
14
+ ## Try it
15
+
16
+ For the first release candidate, see the [0.1.0rc1 notes and wheel installation](docs/releases/0.1.0rc1.md).
17
+
18
+ From a checkout, install with Python 3.10 or newer in your virtual environment.
19
+
20
+ ```sh
21
+ git clone https://github.com/culvert-labs/shirudo-python.git
22
+ cd shirudo-python
23
+ python -m pip install .
24
+ ```
25
+
26
+ Inspect the report captured after loading a signed test upatch in the official
27
+ VM. Run this example from the repository root.
28
+
29
+ ```python
30
+ from pathlib import Path
31
+ from shirudo_python import parse_status_report
32
+
33
+ report = parse_status_report(Path("tests/fixtures/upstream/target-loaded.json").read_bytes())
34
+ print(report.summary.status) # ok
35
+ print([patch.name for patch in report.upatches_loaded]) # ['basic']
36
+ ```
37
+
38
+ To use a real report, capture it on a Shirudo host with
39
+ `shirudo status --json > status.json`, then read that file in the same way.
40
+ The verdict comes from the report's producer. Use upstream attestation tooling
41
+ when you need to establish the state of a remote host.
42
+
43
+ ## Documentation and development
44
+
45
+ - [Status API](docs/status.md) covers the fields, accepted inputs and errors.
46
+ - [Shared summary profile](docs/summary-conformance.md) documents bounded summary parsing and the Python/Go conformance vectors.
47
+ - [Full report guide](docs/full-status.md) shows how to inspect a report and distinguish omitted fields from null values.
48
+ - [Full report compatibility decision](docs/decisions/0002-full-status-report.md) maps the model to the upstream producer, tests and format history.
49
+ - [Capture evidence](docs/evidence.md) records the upstream revision, official VM workflow, report hashes and limits of the observations.
50
+ - [Upstream proposal](docs/upstream-proposal.md) describes the operator use case, maintenance strategy and possible adoption paths.
51
+ - [Initial design decision](docs/decisions/0001-offline-status-summary.md) records the compatibility baseline and scope.
52
+ - [Contributing](CONTRIBUTING.md) explains how to run the offline tests and propose changes.
53
+ - [BSD 2-Clause license](LICENSE) covers this project.
54
+ - [Ecosystem roadmap](docs/ecosystem.md) connects operator requirements, upstream contributions and the work planned across the SDKs.
55
+ - [Rust onboarding contract](docs/rust-onboarding.md) explains how an independent implementation can demonstrate compatibility.
56
+ - [Upstream changes](docs/upstream-compatibility.md) explains the weekly check and how to triage a changed producer.
57
+ - [Release rehearsal](docs/release.md) covers reproducible wheels and source distributions, registry ownership and the handoff to a future crate maintainer.
58
+ - [Support summary example](examples/support_summary.py) reads a saved report on stdin and prints alerts, loaded names and counter totals. See the [operator walkthrough](docs/ecosystem.md#using-the-support-summary).
@@ -0,0 +1,35 @@
1
+ # 0001. Read saved status reports
2
+
3
+ Accepted on 2026-11-28.
4
+
5
+ ## Context
6
+
7
+ An operator may need to read reports from many targets on a workstation.
8
+ Shirudo already computes the verdict and emits it in a versioned JSON
9
+ document. The process exit code alone cannot tell the operator which verdict
10
+ Shirudo reported. [Upstream status format](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/Documentation/reference/formats/status-json.rst)
11
+
12
+ ## Decision
13
+
14
+ Start with a Python function that accepts a saved report and returns its
15
+ schema version, build ID, hostname, role flags, verdict and reason. The
16
+ caller handles collection and storage. Shirudo owns verdict calculation and
17
+ attestation. Keep the upstream field names so users can compare a summary
18
+ directly with the original report.
19
+
20
+ Require the seven fields the function consumes and accept additional fields
21
+ in schema 1. An unknown schema version requires a compatibility review.
22
+ Document the upstream revision used for each format decision and test
23
+ changes against local fixtures.
24
+
25
+ ## Consequences
26
+
27
+ Developers can reproduce parser tests without a running target, a TPM,
28
+ privileged access or a network connection. The summary omits diagnostic
29
+ detail, so consumers that need per-condition or per-upatch data must
30
+ retain the source report.
31
+
32
+ The small interface and BSD-2-Clause license give upstream maintainers a
33
+ bounded change to evaluate if they choose to adopt it. Track proposed
34
+ extensions in public issues or pull requests with the corresponding
35
+ upstream reference, compatibility impact and a test case.
@@ -0,0 +1,56 @@
1
+ # 0002. Read the full report at a pinned producer revision
2
+
3
+ ## Operator use case
4
+
5
+ A saved report can explain why a host received a particular verdict. A
6
+ support tool should be able to show the condition detail, the keyring
7
+ Shirudo inspected, or the reported measurement state without installing
8
+ Shirudo on the analyst's workstation.
9
+
10
+ Keep `parse_status()` for callers that have only the seven summary fields.
11
+ Add `parse_status_report()` for consumers of the full CLI document. Both
12
+ use the standard library. The full model keeps upstream field names and
13
+ order within arrays. Each call owns its immutable result.
14
+
15
+ ## Compatibility baseline
16
+
17
+ The baseline is upstream `dbdb125edbdf2cc83344669cd50f8c07d723668a`.
18
+ `schema: 1` alone does not identify a producer revision. When updating
19
+ the baseline, compare the writer, the reference, branch-specific tests and
20
+ captures. Record the new SHA and keep previous evidence for regression tests.
21
+
22
+ | Surface | Implementation detail that affects a reader |
23
+ | --- | --- |
24
+ | Verdicts and conditions | Preserve the verdict, reason, condition strings, detail and order even when the reader has never seen their values. [Producer](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/builtin-status.c#L1560-L1583) |
25
+ | Keyrings | The BPF ring emits a `primary` flag, while the dm-verity ring emits `config`. Unreadable certificate details and absent key links have nullable fields. [Writer](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/builtin-status.c#L1027-L1094) · [upstream VM assertions](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/testing/functional/tamperproof/t6140-status-keyrings.sh) |
26
+ | Event log | An unreadable record can produce a row containing just `type`. Optional details depend on the record. Keep the order and represent omissions. [Writer](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/builtin-status.c#L245-L278) · [upstream tests](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/testing/functional/tpm/t4007-status-eventlog.sh) |
27
+ | Upatches and counters | `missed_runs` and `integrity_attempts` were added within schema 1. Preserve absence, null, and reported counts separately. [Upatch change](https://github.com/shirudo-dev/shirudo/commit/602fa0c724886f7b609bfbad7fe216ddf5d8a11e) · [counter change](https://github.com/shirudo-dev/shirudo/commit/64692cd4a908e93ad86c205c365cbde84750122c) |
28
+ | Inventory and tree | Inventory has producer-defined sentinels such as `-1` and empty text. A readable tree has individual state fields. Its unavailable form has a null `state`. [System writer](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/util/sysinfo.c) · [tree writer](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/util/bpm_tree_state.c) |
29
+
30
+ The full reader consumes recognized fields and tolerates additive keys.
31
+ Keep original capture bytes for audit or reprocessing. Unknown integer
32
+ schema versions require an explicit compatibility review. The parser
33
+ validates representation. Evidence collection, access control, attestation
34
+ and operational policy remain responsibilities of the caller and Shirudo.
35
+
36
+ ## Existing upstream work and ownership
37
+
38
+ Upstream's Python jobs transform backend inputs into ClickHouse rows.
39
+ Its end-to-end helpers read observability snapshots, and its keepalive
40
+ tool regenerates test fixtures. The status CLI emits a distinct document.
41
+ This package reads that document offline. It does not reproduce ingestion,
42
+ fixture generation or the CLI's evaluation rules.
43
+ [Backend jobs](https://github.com/shirudo-dev/shirudo/tree/dbdb125edbdf2cc83344669cd50f8c07d723668a/tools/backend/jobs) ·
44
+ [snapshot reader](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/testing/end2end/snapshots.py) ·
45
+ [keepalive fixtures](https://github.com/shirudo-dev/shirudo/tree/dbdb125edbdf2cc83344669cd50f8c07d723668a/testing/fixtures/keepalive).
46
+
47
+ On November 28, 2026, the public organization listed `shirudo` and
48
+ `shirudo.dev`. The source tree, public milestones, and issue and PR searches
49
+ for “Python SDK”, “Python bindings” and “Python client” did not identify a
50
+ published SDK plan. Upstream documents architecture work and has an open
51
+ discussion of status-table test coverage. These are point-in-time findings.
52
+ The maintainers can clarify any unannounced or differently named work.
53
+ [Public repositories](https://github.com/orgs/shirudo-dev/repositories) ·
54
+ [milestones](https://github.com/shirudo-dev/shirudo/milestones) ·
55
+ [architecture work](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/Documentation/contribute/arch-support.rst) ·
56
+ [status-table issue](https://github.com/shirudo-dev/shirudo/issues/255).
@@ -0,0 +1,19 @@
1
+ # 0003. Keep one pinned conformance corpus in shirudo-python
2
+
3
+ Accepted on November 28, 2026. The Python and Go maintainers can update their SDKs independently. Shirudo owns the producer format and its versioning. Until an upstream release, its formats carry no compatibility promise. [Upstream version policy](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/Documentation/reference/versions.rst#L14-L22)
4
+
5
+ ## Options considered
6
+
7
+ | Location | Benefit | Cost or dependency |
8
+ | --- | --- | --- |
9
+ | Existing Python repository | Working CI in two languages already refers to an immutable revision. Capture commands, hashes, raw bytes and their provenance share a review history. | The Python repository hosts a contract other maintainers need to be able to review. |
10
+ | Dedicated community repository | Independent releases and co-maintainer rights could help projects with different release schedules. | A move adds a release process, migration of two pins and a decision about custody of captured host data. |
11
+ | Upstream tree | Maintainers could test important wire-level examples at the point of change. | Upstream must choose the scope, license and ownership. The downstream limits and error names are SDK decisions. |
12
+
13
+ Keep the manifest in its current location. A Rust crate can replay it from a Git commit without installing Python. Hash and read the original captures from the existing evidence archive. Keep projections explicitly labeled and avoid multiplying copies of inventory or certificate data. The canonical vectors are versioned separately from package versions through their profile name and Git commit. [Pinned manifest](https://github.com/culvert-labs/shirudo-python/blob/68a8b41a53810c66e4bfbb38b43b4401e8a83256/tests/fixtures/summary-v1.json) · [Go replay](https://github.com/culvert-labs/shirudo-go/blob/f776921c61112a5b3416e324dbe4cef3875eac48/status/conformance_test.go)
14
+
15
+ ## Changes and reconsideration
16
+
17
+ Open a corpus PR with the upstream source, exact input, expected result and provenance. Invite the maintainers of affected readers to review. Replay old and proposed pins in each reader. Adding a test for existing behavior can retain the profile name. An intentional incompatible acceptance or outcome change needs a new profile identifier, its own manifest and migration notes. Retain existing pins for released readers.
18
+
19
+ Revisit extraction when an independent maintainer needs shared write or release authority, coordinated updates demonstrably block a consumer, or upstream offers to host a subset. Name the prospective maintainers and record the actual coordination cost. Before a move, replay the same hashes and outcomes from the proposed location in both SDKs, retain the historical archive links, and switch one consumer at a time. A third SDK can start using the corpus before that decision.
@@ -0,0 +1,53 @@
1
+ # Shirudo community engineering roadmap
2
+
3
+ Reviewed November 28, 2026. Culvert Labs maintains unofficial integrations. Shirudo owns status generation, the meaning of verdicts, attestation and its telemetry backend. The two SDKs read a saved document and preserve what the producer reported. [Upstream](https://github.com/shirudo-dev/shirudo/tree/dbdb125edbdf2cc83344669cd50f8c07d723668a) · [Upstream backend](https://github.com/shirudo-dev/shirudo/tree/dbdb125edbdf2cc83344669cd50f8c07d723668a/tools/backend)
4
+
5
+ ## Current evidence
6
+
7
+ | Component reviewed | Available today | Evidence boundary |
8
+ | --- | --- | --- |
9
+ | [Python at 92a584d](https://github.com/culvert-labs/shirudo-python/tree/92a584d1ce51a112878041fe043889f42bb271a3) | Original summary, bounded summary and immutable full diagnostic model. Installed-wheel CI on Linux, macOS and Windows. | Only the bounded summary is shared across languages. |
10
+ | [Go at f776921](https://github.com/culvert-labs/shirudo-go/tree/f776921c61112a5b3416e324dbe4cef3875eac48) | Standard-library byte and stream readers, bounded inputs, shared error categories, race/fuzz tests and cross-platform CI. | Seven fields. Callers own collection and deadlines. |
11
+ | [Shared evidence](evidence.md) | Two readers, 40 vectors including six raw outputs, with one producer pin and independently replayed VM capture. | Two observed verdicts, one x86-64 software TPM workflow. Other states and physical TPMs remain unverified. |
12
+
13
+ The upstream compatibility proposal was open with zero replies at review. GitHub repository search for `shirudo language:Rust` and the crates.io search for `shirudo` yielded no matching Rust SDK. These searches cannot establish anyone's private plans. No external adoption of either SDK has been verified. [Upstream proposal #389](https://github.com/shirudo-dev/shirudo/issues/389) · [Rust onboarding](rust-onboarding.md)
14
+
15
+ ## Consumers and collaboration
16
+
17
+ | Public project or operator | Observed need | Next useful collaboration |
18
+ | --- | --- | --- |
19
+ | [Treeward's Go adapter](https://github.com/treeward-ai/treeward/blob/b52ce0b20b06e71c5ba32d04b58e75ee9b409f5a/internal/runtime/shirudo.go#L75-L133) | Reads verdicts and loaded upatch names; also accommodates a string-list representation. | Establish the origin of that representation and ask which fields a reusable reader would replace before expanding Go. The existing summary cannot replace the entire adapter. |
20
+ | [OpenClaw Shirudo plugin](https://github.com/daniel-lxs/openclaw-shirudo-plugin/blob/499c1cb26cd5b0ae642f7cc8452d6cd4cac34d7d/src/status.js#L78-L103) | Displays the producer verdict, conditions, upatches and counter information. | The support example below demonstrates these fields from a saved report. Offer compatible examples or vectors if the JavaScript maintainers identify a gap. |
21
+ | [Spin Stack](https://github.com/spin-stack/shirudo-demo/tree/d0b0a59b40de1d4061763db621d691ae7394db28) and [Rootz verifier](https://github.com/rootz-global/rootz-shirudo-verify/tree/eaefdcccf5fce3f6706efbc2927423c99771f2e5) | A runnable guest demonstration and an attestation evidence consumer already exist. | Refer callers to these projects where their formats and trust requirements fit. Keep evidence verification with its maintainers. |
22
+ | [Shirudo operators](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/Documentation/operate/run/read-status.rst#L893-L931) | A monitoring job must read the producer's verdict, even when the producer exits successfully. | Exercise the Go saved-report check against a real adverse report and future verdicts. [Go example](https://github.com/culvert-labs/shirudo-go/tree/main/examples/statuscheck) |
23
+
24
+ ### Using the support summary
25
+
26
+ On a workstation with the Python SDK installed, run this from the SDK checkout. The original incident report stays on the workstation. The example selects fields and preserves their text verbatim. Review producer-controlled strings before sharing the output.
27
+
28
+ ```sh
29
+ python examples/support_summary.py < tests/fixtures/upstream/target-loaded.json
30
+ ```
31
+
32
+ The loaded VM report gives `ok`, one loaded name (`basic`), a tamper total of 24 and an integrity total of zero. The operator capture instead gives `lsm-off` with a null integrity total. If an older report omits that counter block, the example omits the output field. [Example](../examples/support_summary.py) · [Regression tests](../tests/test_support_example.py)
33
+
34
+ ## Next decisions and completion evidence
35
+
36
+ | Priority | Owner and next action | Evidence for completion |
37
+ | --- | --- | --- |
38
+ | Keep the shared contract reproducible | Both SDK maintainers review changes to the bounded profile. Keep one corpus in Python for now. | Both languages pass the same new pin and retain coverage of older captures. Revisit extraction when ownership or release coordination warrants it. [Ownership decision](decisions/0003-conformance-ownership.md) |
39
+ | Catch producer changes early | Python maintainers run the upstream drift check and triage changes to writers, documentation or tests. For behavior changes, capture from the candidate producer and replay both readers before moving the pin. | Review record names both SHAs, changed behavior, captures and each reader's result. A matching documentation sample alone cannot certify a new binary. |
40
+ | Release the existing SDKs | Each SDK maintainer rehearses a clean build or module download from a revision, validates metadata and exercises the installed public API. | Record archive or module hashes, tool versions, CI and exact source tag. Check registry ownership before the first publication. |
41
+ | Enable independent Rust maintainership | A volunteer owns the crate and selects its API and dependency policy. | A public native CI run checks all cases at the same pin; the maintainer documents support and rehearses a crate release. [Onboarding](rust-onboarding.md) |
42
+ | Contribute upstream | Offer small changes that solve an upstream operator problem and follow the project's contribution process. | Link the upstream decision or merged commit. Keep proposed, submitted and accepted changes distinct. |
43
+ | Expand diagnostic coverage | Start with a documented consumer gap or a producer change. Seek a shareable capture of an uncovered state with a willing operator. | Record consent, minimized data, exact revision, reproducible read-only check and an independent replay before claiming coverage. |
44
+
45
+ For release and compatibility work, follow the [upstream tracker runbook](upstream-compatibility.md), [Python distribution rehearsal](release.md), and [Go module rehearsal](https://github.com/culvert-labs/shirudo-go/blob/main/docs/release.md).
46
+
47
+ ## Candidate for upstream
48
+
49
+ The bug-report redaction table lists `system.hostname` and the journal. The JSON writer also emits top-level `host` with inventory disabled. The target-boot capture contains only the top-level hostname; the inventory capture contains both. A one-line change can help operators review both locations before sending a report. Suggested replacement for the **Where** cell is “`status.json` (`host` and, when present, `system.hostname`) and the journal”. Upstream requires a human reviewer to sign off and submit agent-assisted patches. This candidate is ready for that review. [Guide](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/Documentation/operate/troubleshoot/bug-report.rst#L171-L179) · [Writer](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/builtin-status.c#L1818-L1825) · [Contribution rules](https://github.com/shirudo-dev/shirudo/blob/dbdb125edbdf2cc83344669cd50f8c07d723668a/Documentation/contribute/code/contributing.rst#L169-L172)
50
+
51
+ The upatch-table and similarity tests proposed in issue #255 already have a contributor and an open PR. Coordinate there if the author asks for help. [Existing upstream contribution #313](https://github.com/shirudo-dev/shirudo/pull/313)
52
+
53
+ Update this record when evidence changes. Track accepted upstream patches, public downstream use, independent maintainers and repeatable conformance runs by linking their actual artifacts. For developer experience, record a contributor's first successful replay or a concrete installation obstacle and its fix.