Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .altru/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
- 2026-12-05: Open core. Apache-2.0 for code and schema, CC BY 4.0 for docs and standards registry; names/logos not licensed; future hosted/enterprise features under separate terms outside this repo - because security users must be able to audit the rules, and Apache needs no contributor agreement for an open-core model.
- 2026-12-05: Position PostQuantum as the assurance layer (claims -> evidence -> signed verdicts), importing discovery via CycloneDX CBOM instead of competing with CBOMkit, Keylens, xgrep and commercial scanners - because plain discovery is crowded and nobody proves scoped claims.
- 2026-12-05: CLI name `pqcheck` must change before release (taken on PyPI by another PQC scanner). Candidates: pqwitness, pqdocket.
- 2026-12-05: Product/CLI name `pqdocket` (repo stays PostQuantum) - free on PyPI; a docket is a case file, which avoids implying the authors vouch.
- 2026-12-05: Signature features F1-F9 added to roadmap; priority F1 self-verifying record, F4 next step per gap, F6 release evidence; then F3 disproof-first verdicts.
- 2026-12-05: Operators sign their own evidence records; authors/ALTRU.dev never sign or vouch for verdicts.
- 2026-12-05: Release evidence (F6) = stdlib script + GitHub build provenance attestation (Sigstore, keyless) in the release workflow; actions pinned to commit SHAs.
8 changes: 5 additions & 3 deletions .altru/STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Updated: 2026-12-05

## Now
R0 foundation nearly done. Licensed (Apache-2.0 code, CC BY 4.0 docs/registry). 42 tests, ruff and mypy --strict clean.
R0 code complete pending merge: CI, strict schema 1.1.0, files_not_scanned count, release evidence + attestation. 54 tests.

## Last session
- Chose open-core licensing; added LICENSE, NOTICE, LICENSING.md; removed LICENSE-DECISION.md.
Expand All @@ -12,12 +12,14 @@ R0 foundation nearly done. Licensed (Apache-2.0 code, CC BY 4.0 docs/registry).
- Oversized files now counted as skipped.

## Next
1. Pick the new CLI/product name, then add CI (pytest, ruff, mypy) to close R0.
1. Enable private vulnerability reporting; tag v0.1.0 to produce the first release evidence record.
2. R1: CycloneDX CBOM import/export.

## Gotchas
- Workflow files may need pushing from the VPS (token with `workflow` scope).
- Release evidence fails on a dirty tree, failed tests, or a tag/version mismatch by design.
- Direction changed 2026-12-05: assurance layer, not a scanner. Read docs/PRODUCT_SPEC.md and docs/ROADMAP.md first.
- `pqcheck` is taken on PyPI; `shorline` too (both PQC scanners).
- Renamed to `pqdocket` (module src/pqdocket). `pqcheck` and `shorline` are taken on PyPI by other PQC scanners.
- Repo About/settings: chat sandbox proxy blocks settings writes; use gh on the VPS (signed in as altrudev).
- Private vulnerability reporting is off, but SECURITY.md refers to it.
- Rules are hardcoded in rules.py; standards/registry.yaml is not loaded by code yet.
Expand Down
9 changes: 6 additions & 3 deletions .altru/TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
## R0 finish
- [x] License files and LICENSING.md - check: LICENSE md5 matches canonical Apache-2.0
- [x] Skip-dir, PQC-as-DSA and missed-signal fixes - check: pytest
- [ ] CI workflow - check: green run on a PR
- [ ] Schema validation of reports in CI
- [x] CI workflow - check: green run on a PR
- [x] Schema validation of reports in CI
- [x] Release evidence record (F6) - check: tests/test_release_evidence.py
- [ ] Tag v0.1.0
- [ ] Enable GitHub private vulnerability reporting

## Repositioning
- [x] Rewrite spec, roadmap, backlog, architecture around assurance layer
- [ ] Choose new CLI/product name and rename package
- [x] Choose new CLI/product name and rename package (pqdocket)
- [x] Add signature features F1-F9 to roadmap

## Backlog
- Load rules from standards/registry.yaml
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: python -m pip install -e ".[dev]"
- name: Lint
run: ruff check .
- name: Type check
run: mypy src
- name: Test
run: pytest
- name: Scan this repository and validate the report against the schema
run: |
pqdocket scan . --output pqc-report.json
python -c "import json, jsonschema; jsonschema.validate(json.load(open('pqc-report.json')), json.load(open('schemas/scan-report.schema.json'))); print('report valid')"
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # create the GitHub release
id-token: write # sign the build provenance attestation (Sigstore)
attestations: write # store the attestation
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Install
run: python -m pip install -e ".[dev]" build
- name: Check tag matches package version
run: |
version=$(python -c "import pqdocket; print(pqdocket.__version__)")
test "v$version" = "$GITHUB_REF_NAME" || { echo "Tag $GITHUB_REF_NAME does not match version $version"; exit 1; }
- name: Lint, type check, test
run: |
ruff check .
mypy src
pytest --junitxml=junit.xml
- name: Build
run: python -m build
- name: Release evidence record
run: python scripts/release_evidence.py --dist dist --junit junit.xml --out release-evidence.json
- name: Attest build provenance
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: |
dist/*
release-evidence.json
- name: Publish GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" dist/* release-evidence.json \
--title "pqdocket $GITHUB_REF_NAME" \
--notes "Includes release-evidence.json, this release's own evidence record. Verify artifacts with: gh attestation verify <file> --repo $GITHUB_REPOSITORY"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ build/
*.egg-info/
# Scan reports can contain source excerpts and paths; keep them out of git.
pqc-report*.json
junit.xml
release-evidence.json
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ mypy src

Licensing: contributions are accepted under the license of the files they change (Apache-2.0 for code and schemas, CC BY 4.0 for docs and the standards registry). See LICENSING.md.

Releases: bump `__version__` in `src/pqdocket/__init__.py`, merge, then push a tag `v<version>`. The release workflow refuses to publish if the tag and version differ, tests fail, or the tree is dirty, and it publishes `release-evidence.json` with a build provenance attestation.

PR checklist: tests; docs/limitations; standards source checked; no secrets; schema changes versioned; false-positive behavior considered.
2 changes: 1 addition & 1 deletion LICENSING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Copyright 2026 Valentyn Rukhaylo (ALTRU.dev).
- The docs and registry are reference material; CC BY 4.0 lets anyone reuse them with credit.

## Names and logos
The licenses above cover code and content only. They grant no rights to the project names or logos ("PostQuantum", "pqcheck", "ALTRU.dev"). You may say that your work is based on or compatible with this project, but don't present a fork as the official project.
The licenses above cover code and content only. They grant no rights to the project names or logos ("PostQuantum", "pqdocket", "ALTRU.dev"). You may say that your work is based on or compatible with this project, but don't present a fork as the official project.

## No warranty, no attestation
The software is provided "as is", without warranties or conditions of any kind (Apache-2.0 sections 7 and 8). Running PostQuantum does not make its authors or ALTRU.dev a verifier, auditor, assessor, or certification body for your systems. Evidence records and verdicts are produced and signed by whoever runs the tool, and that party alone is responsible for statements made with them. The authors do not sign, review, or vouch for any user's records or verdicts.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PostQuantum (pqcheck)
PostQuantum (pqdocket)
Copyright 2026 Valentyn Rukhaylo (ALTRU.dev)

This product is licensed under the Apache License, Version 2.0 (see LICENSE).
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Requires Python 3.11+.
python -m venv .venv
source .venv/bin/activate # Windows: .venv\\Scripts\\Activate.ps1
python -m pip install -e ".[dev]"
pqcheck scan . --format json --output pqc-report.json
pqdocket scan . --format json --output pqc-report.json
pytest
```

Expand All @@ -31,18 +31,23 @@ pytest
- Line-level evidence, rule IDs, confidence, and file SHA-256.
- JSON report output and versioned schema.
- Hybrid (X25519MLKEM768), pre-standard (Kyber, Dilithium), JWT (RS256, ES256) and finite-field DH indicators.
- Oversized and unreadable files are counted as skipped, never silently dropped.
- Oversized and unreadable files are counted as skipped, and files of types it doesn't read (e.g. Dockerfile, .pem) are counted as not scanned; nothing is dropped silently.
- Strict, versioned report schema (1.1.0), validated in CI.
- CI on Python 3.11 to 3.14 (lint, type check, tests, self-scan).
- Every release ships its own evidence record (`release-evidence.json`) and a signed build provenance attestation.
- Tests for representative detection and false-positive cases.

## Not implemented
CBOM import/export; claims and assurance evaluator; signed evidence records; CI; schema validation of reports; semantic/data-flow analysis; lockfile/SBOM correlation; TLS/SSH/VPN/certificate inspection; runtime-use verification; PQC correctness/interoperability tests; risk scoring; migration automation; dashboard; GitHub App.
CBOM import/export; claims and assurance evaluator; signed evidence records for user verdicts; semantic/data-flow analysis; lockfile/SBOM correlation; TLS/SSH/VPN/certificate inspection; runtime-use verification; PQC correctness/interoperability tests; risk scoring; migration automation; dashboard; GitHub App.

## Layout
- `docs/`: product, architecture, threat model, assurance, risk, roadmap, backlog.
- `standards/`: versioned algorithm registry.
- `schemas/`: machine-readable report schema.
- `src/pqcheck/`: CLI and discovery engine.
- `src/pqdocket/`: CLI and discovery engine.
- `tests/`: unit tests and regression fixtures.
- `scripts/`: release tooling (release evidence record).
- `.github/workflows/`: CI and release.

## Standards references
- NIST FIPS 203 / ML-KEM: https://csrc.nist.gov/pubs/fips/203/final
Expand Down
9 changes: 9 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@
This is an early-stage local source scanner, not a certification or production approval mechanism. Do not publish exploit details in public issues. Use GitHub private vulnerability reporting if enabled, or the maintainer's configured security contact.

Never include private keys, credentials, customer source, or confidential production reports in public issues. Only the latest development branch is currently supported.

## Verifying a release
Each GitHub release includes `release-evidence.json` (the release's own evidence record: commit, test results, rule set, schema and artifact hashes) and a build provenance attestation signed in the release workflow. Verify any downloaded file with:

```bash
gh attestation verify <file> --repo altrudev/PostQuantum
```

The evidence record describes the pqdocket release only. It is not an assessment of any system pqdocket scans.
2 changes: 1 addition & 1 deletion docs/ASSURANCE_MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Evidence ID; rule/adapter and version; scanner version; asset and source; observ
Require provider and version, parameter set, reachable application/protocol call path, deployed negotiation/configuration evidence, correctness/interoperability results, and explicit scope/date. A manifest entry alone is insufficient.

## Decision rules
Missing data never defaults to secure. Conflicts remain visible. Standard name does not prove conformance. Library capability does not prove runtime use. Unit tests do not prove deployment configuration. Every assurance statement lists scope, evidence, date, and limitations.
A claim reaches `verified` only after the template's disproof checks (classical fallbacks, downgrade paths, alternate endpoints or versions) have run and failed to break it; each attempt is recorded. Missing data never defaults to secure. Conflicts remain visible. Standard name does not prove conformance. Library capability does not prove runtime use. Unit tests do not prove deployment configuration. Every assurance statement lists scope, evidence, date, and limitations.

## Who signs and who vouches
PostQuantum is a tool, not a verifier. The organization that runs it signs its own evidence records with its own key. That signature means "we ran this evaluation, with these inputs and tool versions, on this date, and the record has not changed since". It is not an endorsement by the PostQuantum authors or ALTRU.dev, who never sign, review, or vouch for anyone's verdicts and do not act as an auditor, assessor, or certification body. Anyone relying on a record (customer, auditor, regulator) relies on the organization that signed it, and can re-run the evaluation to check it.
Expand Down
20 changes: 15 additions & 5 deletions docs/BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
- [x] Run tests/lint in target environment.
- [x] Choose license (Apache-2.0 code, CC BY 4.0 docs/registry).
- [x] Skip-folder check limited to paths inside the target.
- [ ] CI workflow (pytest, ruff, mypy).
- [ ] Tighten report schema (types, enums) and validate reports in CI.
- [ ] Report files with unlisted extensions as not scanned.
- [ ] Rename CLI (`pqcheck` is taken on PyPI).
- [x] CI workflow (pytest, ruff, mypy, self-scan) on Python 3.11 to 3.14.
- [x] F6: release evidence record (tests, rules, schema and artifact hashes) plus Sigstore build provenance attestation in the release workflow.
- [x] Tighten report schema (types, enums) and validate reports in CI.
- [x] Report files with unlisted extensions as not scanned.
- [x] Rename CLI and package to `pqdocket` (`pqcheck` is taken on PyPI).
- [ ] Enable GitHub private vulnerability reporting (referenced by SECURITY.md).
- [ ] Cut first release `v0.1.0`.

## R1 — Interoperability
- [ ] CycloneDX CBOM importer with provenance.
Expand All @@ -26,6 +29,9 @@
- [ ] Evidence requirement profiles for the first three templates.
- [ ] Evaluator producing verdicts and gap lists.
- [ ] Known-good and known-bad fixtures per template.
- [ ] F3: disproof checks per template (fallbacks, downgrades, alternate endpoints/versions).
- [ ] F4: next-step command for every gap.
- [ ] F5: plain-English claim parser that echoes the exact claim evaluated.

## R3 — Evidence graph
- [ ] Graph node and edge types; observed vs inferred links.
Expand All @@ -36,6 +42,8 @@
- [ ] Content-hashed verdict bundle format.
- [ ] Detached signature and offline verifier.
- [ ] Evaluate in-toto/DSSE and ML-DSA signing.
- [ ] F1: self-verifying offline HTML record (PWX-style packaging, in-page signature check).
- [ ] F2: FreeTSA (RFC 3161) and OpenTimestamps stamps in every record.

## R5 — Deployment collectors
- [ ] TLS handshake observer (negotiated group, signature algorithm) with allowlist.
Expand All @@ -44,5 +52,7 @@

## R6+ — Product surface
- [ ] GitHub Action gating on verdicts.
- [ ] HTML report of verdicts and gaps.
- [ ] F7: verifiable README badges linked to records.
- [ ] F8: questionnaire answer export linked to records.
- [ ] F9: opt-in public transparency log (R8).
- [ ] Commercial layer (outside this repository).
6 changes: 3 additions & 3 deletions docs/PRODUCT_SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Security and platform engineers proving migration progress; product security tea
## Workflows
1. Import inventories: CycloneDX CBOMs from external tools, plus the built-in scanner.
2. Normalize records into the evidence graph, keeping observed and inferred links distinct.
3. State claims from templates for named assets and scopes.
4. Evaluate claims against requirement profiles; produce verdicts and a gap list ("to verify this, provide: negotiated group from a TLS handshake of host Y").
3. State claims in plain English or from templates for named assets and scopes; pqdocket shows the exact claim it evaluated.
4. Evaluate claims against requirement profiles, including attempts to disprove them; produce verdicts and a gap list where every gap names the action that would close it ("to verify this, provide: negotiated group from a TLS handshake of host Y").
5. Collect missing evidence with authorized collectors (e.g. TLS handshake observation) or attach it manually.
6. Sign verdicts as evidence records.
6. Sign verdicts as evidence records: a self-verifying offline HTML file with outside time stamps.
7. Re-evaluate on new scans; diff verdicts between releases and flag regressions.

## Functional requirements
Expand Down
Loading