Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6bba433
Plan joint process and confidential metadata completion
SpecterAoD Nov 27, 2026
f14f068
Protect path index nodes and verified sender identities
SpecterAoD Nov 27, 2026
386984f
Diagnose native process access probe failures
SpecterAoD Nov 27, 2026
ac02078
Read back inspector debug privilege without modifying tokens
SpecterAoD Nov 27, 2026
504abcb
Protect hidden sender construction and signature workspaces
SpecterAoD Nov 27, 2026
776d654
Protect private framing and retained stream counters
SpecterAoD Nov 28, 2026
dd5f481
Integrate Main file race regressions without dropping security work
SpecterAoD Nov 28, 2026
77da5fd
Merge Main357 into joint R7/R8 draft preserving all security changes
SpecterAoD Nov 28, 2026
deca57e
Prelock shared page registry records and guard ownership
SpecterAoD Nov 28, 2026
a48d305
Respect Windows COFF alignment in protected registry storage
SpecterAoD Nov 28, 2026
5470c18
Match protected Windows data to default PE image alignment
SpecterAoD Nov 28, 2026
d818ff3
Prelock native archive and source read paths
SpecterAoD Nov 28, 2026
cfcac6a
Preserve sandbox compatibility in native file reads
SpecterAoD Nov 28, 2026
f864741
Merge Main358 handle-based publication into joint R7/R8 draft
SpecterAoD Nov 28, 2026
3dc0fdf
fix(security): prelock source collection records and sort state
SpecterAoD Nov 28, 2026
5cf5747
fix(security): fold confidential names without private expansion scratch
SpecterAoD Nov 28, 2026
8ea8d76
fix(security): capture source metadata into prelocked native records
SpecterAoD Nov 28, 2026
fc26cc9
Fail closed on unverified Linux CLI startup protection
SpecterAoD Nov 28, 2026
d5642d9
Verify own Windows process ACL from a reduced inspector thread
SpecterAoD Nov 28, 2026
bd8dfc5
Prelock skipped records and concrete OS-name conversion state
SpecterAoD Nov 28, 2026
8ca6fb7
Prelock actual Linux source directory traversal and sorting records
SpecterAoD Nov 28, 2026
aae9a06
Add a protected synchronous NT directory caller and native fixtures
SpecterAoD Nov 28, 2026
8913f5c
Protect native Windows source traversal and WTF-8 ownership
SpecterAoD Nov 28, 2026
c03f8fd
Preserve std semantics for bare verbatim drive joins
SpecterAoD Nov 28, 2026
13f2cb4
Diagnose native Windows path oracle differences before long suites
SpecterAoD Nov 28, 2026
3fad4e4
Match linked std prefix semantics without private path copies
SpecterAoD Nov 28, 2026
feb4e2e
Merge Main359-361 release and unnamed-output updates into joint R7/R8…
SpecterAoD Nov 28, 2026
dd36dc5
Prelock complete report records before producer output
SpecterAoD Nov 28, 2026
968684f
Protect listing JSON formatting and native feature coverage
SpecterAoD Nov 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ jobs:
# DE/EN: Isolierte Plattform-FFI nativ mit denselben strengen Regeln prüfen.
# EN: Check isolated platform FFI natively under the same strict rules.
- run: cargo fmt --check -p pqkeep-platform
# DE: Pfadsemantik vor langen Suiten nativ prüfen; alle bisherigen Gates bleiben erhalten.
# EN: Check native path semantics before long suites; retain every existing gate.
- name: Windows-Pfadorakel / Windows path oracle
if: matrix.os == 'windows-latest'
shell: bash
run: |
set -euo pipefail
rustc -vV
cargo test --locked --no-default-features --lib \
files::native_path::windows::tests::protected_join_matches_std_drive_unc_verbatim_and_unpaired_units \
-- --exact --nocapture --test-threads=1
- run: cargo clippy --all-targets --all-features --locked -p pqkeep-platform -- -D warnings
- run: cargo test --all-features --locked -p pqkeep-platform
- run: cargo clippy --all-targets --locked -- -D warnings
Expand All @@ -76,10 +87,9 @@ jobs:
run: |
if command -v python3 >/dev/null; then py=python3; else py=python; fi
"$py" scripts/ci_locked_exec.py test
# DE: Laufzeit ohne API auf je einer nativen Linux-/Windows-Plattform (#151).
# EN: Runtime without API on one native Linux/Windows platform each (#151).
# DE: Ohne API ebenfalls auf allen vier nativen Plattformen prüfen (#147, #151).
# EN: Also test without API on all four native platforms (#147, #151).
- name: Tests ohne API / tests without API
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
shell: bash
run: |
if command -v python3 >/dev/null; then py=python3; else py=python; fi
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/process-access-probe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# DE/EN: Explizite öffentliche eigene Prozessprobe, keine vollständige R7-Abnahme.
name: Process access probe

on:
pull_request:
paths:
- 'platform/pqkeep-platform/**'
- 'scripts/test_process_access_probe.ps1'
- '.github/workflows/process-access-probe.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: process-access-probe-${{ github.ref }}
cancel-in-progress: true

jobs:
windows:
name: Owned Windows process access probe
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: rustup show active-toolchain
- run: cargo build --locked -p pqkeep-platform --example process_access_probe --features process-access-probe
- name: Eigene Prozess-DACL und Leseverweigerung / own DACL and denied access
shell: pwsh
run: ./scripts/test_process_access_probe.ps1
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ categories = ["cryptography", "command-line-utilities"]
# EN: Only what is needed to build and for the licence (no tests, scripts, workflows).
include = [
"/src/**",
"/build.rs",
"/data/wordlists/**",
"/Cargo.toml",
"/Cargo.lock",
Expand Down Expand Up @@ -81,7 +82,7 @@ region = { version = "4.0.1", path = "vendor/region-4.0.1" }
serde = { version = "1.0.229", features = ["derive"] }
serde_json = { version = "1.0.154", path = "vendor/serde_json-1.0.154" }
sha3 = { version = "0.12.0", path = "vendor/sha3-0.12.0", features = ["zeroize", "protected-workspace"] }
subtle = { version = "2.6.1", optional = true }
subtle = "2.6.1"
sys-locale = "0.3.2"
thiserror = "2.0.21"
tokio = { version = "1.54.1", default-features = false, features = ["rt-multi-thread", "net", "time", "signal", "sync"], optional = true }
Expand Down Expand Up @@ -130,6 +131,7 @@ tokio = { version = "1.54.1", default-features = false, features = ["macros", "r
[target.'cfg(target_os = "linux")'.dependencies]
landlock = "0.4.7"
libc = "0.2.191"
pqkeep-platform = { version = "0.1.0", path = "platform/pqkeep-platform" }
rustix = { version = "1.1.6", default-features = false, features = ["std", "process", "termios", "event", "thread", "fs"] }
seccompiler = { version = "0.5.0", default-features = false }

Expand All @@ -142,15 +144,15 @@ pqkeep-platform = { version = "0.1.0", path = "platform/pqkeep-platform" }
[target.'cfg(windows)'.dev-dependencies]
# DE: Nur sichere eigene Testfixture, nicht im normalen Produktionsbaum.
# EN: Safe own-console fixture only, excluded from normal production features.
pqkeep-platform = { version = "0.1.0", path = "platform/pqkeep-platform", features = ["native-input-fixture"] }
pqkeep-platform = { version = "0.1.0", path = "platform/pqkeep-platform", features = ["native-input-fixture", "native-memory-fixture", "native-metadata-fixture"] }

# DE: `api` (Standard) baut den REST-Server `pqkeep serve` ein. Ohne das Feature
# (`--no-default-features`) entsteht eine reine CLI ohne Netzwerkcode.
# EN: `api` (default) builds in the REST server `pqkeep serve`. Without the feature
# (`--no-default-features`) a pure CLI without network code is built.
[features]
default = ["api"]
api = ["dep:axum", "dep:hyper", "dep:hyper-util", "dep:tokio", "dep:tower", "dep:subtle", "dep:mime"]
api = ["dep:axum", "dep:hyper", "dep:hyper-util", "dep:tokio", "dep:tower", "dep:mime"]

# DE: Abhängigkeiten auch im Debug/Test-Build optimieren (Argon2 sonst extrem langsam).
# Betrifft nur die Laufzeit, nicht die Semantik; eigener Code bleibt unoptimiert.
Expand Down
8 changes: 8 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ Lizenziert unter der Apache License, Version 2.0 (siehe LICENSE).
This product includes no proprietary code.
Dieses Produkt enthält keinen proprietären Code.

Windows native path normalization / Native Windows-Pfadnormalisierung:
- src/files/native_path_windows.rs adapts get_long_path branch logic from
Rust 1.88.0, library/std/src/sys/path/windows.rs.
Copyright The Rust Project Developers, licensed under Apache-2.0.
Modified: prelocked UTF16 destinations, fallible bounded growth, borrowed input.
DE: Angepasst auf vorab gesperrte UTF16-Ziele, fallibles begrenztes Wachstum
und geliehene Eingabe.

Test vectors / Testvektoren (tests/kat/):
- NIST ACVP-Server (usnistgov/ACVP-Server): public domain / gemeinfrei (US Government work).
- Project Wycheproof (C2SP/wycheproof): Copyright the Wycheproof authors,
Expand Down
32 changes: 32 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//! DE: Öffentliche Unicode-Falttabelle ohne private Laufzeit-Eingaben erzeugen.
//! EN: Generate a public Unicode folding table without private runtime inputs.
use std::{env, error::Error, fmt::Write, fs, path::PathBuf};

fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rerun-if-changed=build.rs");
let mut table = String::from("static FOLD: &[(u32, &[u8])] = &[\n");
for scalar in 0..=0x0010_ffff {
let Some(c) = char::from_u32(scalar) else {
continue;
};
// DE: Nur öffentliche Skalare; privates ToLowercase-Scratch entfällt zur Laufzeit.
// EN: Public scalars only; runtime needs no private ToLowercase scratch.
let folded: String = c
.to_lowercase()
.map(|v| if v == 'ς' { 'σ' } else { v })
.collect();
if !folded.chars().eq(std::iter::once(c)) {
writeln!(
table,
"(0x{:04x}_{:04x}, &{:?}),",
scalar >> 16,
scalar & 0xffff,
folded.as_bytes()
)?;
}
}
table.push_str("];\n");
let destination = PathBuf::from(env::var_os("OUT_DIR").ok_or("missing OUT_DIR")?);
fs::write(destination.join("unicode_fold.rs"), table)?;
Ok(())
}
10 changes: 10 additions & 0 deletions docs/MEMORY_HARDENING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

**DE** | [EN](#english)

DE: PR355 ersetzt die gewöhnlichen gemeinsamen Seiten-/Referenz-/Guard-Records
durch vorab gesperrte Kontroll- und Node-Arenen. Zusätzlicher Registerspeicher
gehört zum nativen Sperrbedarf; die bestehende Statistik zählt weiterhin Seiten
lebender Secret-Bereiche. Nach dem letzten Owner sämtliche Arena-/Kontrollsperren
freigeben; kein permanenter Bootstrap. Reale native Gesamtabnahme noch offen.
EN: No unprotected registry fallback or recursive bootstrap. Preserve overlap,
partial denial and exact final kernel baseline. Two unsafe Send/Sync impls removed;
the narrow native Windows observer is test-only. See
[registry lifetime and FFI review](security/LOCK_REGISTRY_VALIDATION.md).

DE: Feste HKDF/HMAC-Zustände und -Scratch sowie Archiv-Framing/Eintragsdatensätze
verwenden SecretWorkspace: Der innere Pufferdescriptor wird vor Allokation und
privater Befüllung stabil gesperrt. Hashausgabe, HKDF-PRK und -Ergebnis entstehen
Expand Down
83 changes: 77 additions & 6 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,80 @@ EN: Prelock parser/source/index/depth/scratch descriptor; native/security/fuzz
acceptance required. Other R6/R7/R8 boundaries remain OPEN. See
[parser state plan](security/PARSER_STATE_OWNER_PLAN.md).

DE: #147 R6 In Bearbeitung: vollständige Provider-Lebensdauer in Draft334 umgesetzt;
alle neun Zeilen der [Abnahmematrix](security/PROVIDER_LIFETIME_VALIDATION.md) abgleichen.
Finaler signierter Head, native Linux-/Windows-/ARM64-CI, Security/Fuzz und exakter
Rückweg vor Merge erforderlich; kein Teilmerge. R7/R8 separat offen.
EN: Complete R6 implementation; final source-bound acceptance remains required.
Issue147 and roadmap stay In progress; no whole-issue closure.
DE: #147 R6 abgeschlossen: PR334 auf Mainb813bc6 mit allen neun Zeilen der
[Abnahmematrix](security/PROVIDER_LIFETIME_VALIDATION.md), nativer Linux-/Windows-/
ARM64-Abnahme, Security/Fuzz und geprüftem Rückweg übernommen. R7/R8 separat offen.
EN: R6 completed on Main; current shared-provider changes retain its regression
checks. Issue147 and roadmap stay In progress; no whole-issue closure.

DE: #147 R7/R8 gemeinsam in Bearbeitung in [Draft355](https://github.com/SpecterAoD/pqkeep/pull/355):
[vollständig freigegebener Plan](security/PROCESS_METADATA_COMPLETION_PLAN.md).
Geschützte Pfadindex-Knoten und Absenderidentität veröffentlicht; geschützter
verborgener Signierschlüssel-/Kodier-/Verifikationspfad im selben Draft umgesetzt,
Gesamtabnahme noch offen. Windows-DACL nativ zurückgelesen, privilegierter
SeDebugPrivilege-Bypass tatsächlich nachgewiesen; neuer eigener reduzierter
CI-Threadversuch benötigt separate konkrete Freigabe. Kein Teilmerge.
EN: One joint PR; platform/helper, remaining metadata, native/security/fuzz and
full rollback acceptance remain open. See
[hidden signature scope](security/HIDDEN_SIGNATURE_VALIDATION.md) and
[restricted inspector proposal](security/WINDOWS_RESTRICTED_INSPECTOR_PROPOSAL.md).

DE: Derselbe Draft schützt nun auch Trailer-/Signaturnachricht-Bytes und laufende
STREAM-/Rückhalte-Zähler vor privater Befüllung. Berichte, native Pfade,
Sperrregister und Prozess-/Helper-Gesamtabnahme bleiben offen.
EN: Protected framing and retained stream/holdback counters in the same joint PR;
fallible Rust trailer API, unchanged wire bytes. No whole-row completion claim.
See [scope and migration](security/CONFIDENTIAL_FRAMING_VALIDATION.md).

DE: Im selben Draft folgt das vor Befüllung gesperrte gemeinsame Seitenregister:
Kontroll-/Node-Arenen, fallibles Wachstum, geprüfte Überlappung/Teilsperre und
Verweigerung weiterer Aufnahme nach echtem Release-Fehler oder Poisoning.
EN: Protected shared registry accepted on native Linux/Windows/ARM at5470c188.
Two unnecessary unsafe Send/Sync impls removed;
read-only native Windows observer is test-only. Other R7/R8 rows stay open.
See [registry contract and evidence](security/LOCK_REGISTRY_VALIDATION.md).

DE: Native Pfadkonvertierung an den tatsächlichen Archiv-/Quelldatei-Leseeingängen
vor privater Befüllung gesperrt; Windows-Normalisierung mit gesperrtem Ziel und
std-kompatibler248-Grenze. Quell-/Traversal-/Ziel-/Temppfade insgesamt weiter offen.
EN: First actual native read adapters implemented and locally source-checked in
the same Draft355; native acceptance pending, no M1/M3 closure. See
[native path scope](security/NATIVE_PATH_VALIDATION.md).

DE: Gesammelte Quellrecords, Sortierindizes und konkreter Iterator vor privater
Befüllung in gesperrten Arenen; Wachstum nur zwischen geschützten Zielen,
stabile Referenzreihenfolge ohne gewöhnlichen Sortier-Scratch. Abnahme offen.
EN: Actual single/tree/multi/container callers ported in the same joint work;
native traversal/skip/FS intermediates and other plan rows remain open. See
[source collection scope](security/SOURCE_RECORD_VALIDATION.md).

DE/EN: R7/R8 in progress: gemeinsame geschützte Top-Level-/Archiv-Pfadprüfung
und öffentliche Unicode-Buildtabelle lokal implementiert / shared protected
top-level/archive path checks and public build-time Unicode table implemented
locally. Vollständige Abnahme läuft / full acceptance running; kein Gesamtabschluss.

DE/EN: R7/R8 weiterhin in Arbeit: native Quellmetadaten direkt vorab gesperrt
lokal entwickelt / prelocked native source metadata locally developed;
Abnahme läuft / validation running. DirEntry/Traversierung/Skip/Output/Reports
und Prozess-/Helper-Verträge bleiben offen / remain open.

DE/EN: R7/R8 in progress: fallible Linux-Core-Rücklesung und zwingende CLI-
Startprüfung vor argv lokal implementiert / fallible Linux core readback and
mandatory pre-argv CLI startup check locally implemented. Echte drei negative
Syscall-Pfade und normaler Start bestanden / three actual refusal paths and
normal startup passed; integrierte/native Abnahme läuft / acceptance running.


DE: R7/R8 weiterhin In progress in Draft355: native Quellmetadaten8ea8 und Linux-Startgatefc26 vollständig nativ geprüft. Ausdrücklich freigegebene reduzierte Windows-CI-Probed564 erfolgreich, keine vollständige Prozessgarantie. Nächster Teil schützt Skip-Records/UTF-Namenskonvertierung; komplette native Traversierung, Ziel-/Report-/Helper-/Host-Verträge bleiben offen.
EN: Same joint PR, no partial Main merge or whole-issue closure; skipped-record source-bound/native acceptance pending.


DE: Draft355/R7/R8 In progress: Skip-Records bd8dfc5 mit allen25 Checks und vollständigen vier nativen Rust-Logs abgenommen. Linux-native Traversierung anschließend lokal implementiert; echte Namens-/Sortier-/Verweigerungs-/Kernel-/Handle-/Unwind- und Tiefengrenzfälle gezielt bestanden, integrierter Quellencheckpoint/nativ noch offen.
EN: No partial Main merge or overall R7/R8 closure; Windows traversal/output/report/helper/host contracts remain open.


DE: R7/R8 weiter In progress in genau Draft355. Linux-Traversierung8ca6fb7 lokal vollständig geprüft und veröffentlicht, native Gesamtabnahme läuft. Windows-NT-Caller/echte gesperrte SDK-Fixtures lokal in Prüfung; keine vorgezogene Windows-Walker-/Helper-/Host-Abnahme.
EN: Same joint PR, no partial Main merge or scope closure.

DE: R7/R8 weiter In progress in genau Draft355: produktive Windows-Traversierung samt Main361 an feb4e2e und vollständiger gesperrter Report-Record an dd36dc5 jeweils mit allen25 Checks und vier vollständigen nativen Rust-Logs abgenommen. Erfolgreiches Listing-JSON erhält geschützten Cursor/Zahlen-/Escape-Encoder; neue native Abnahme ausstehend. Aktuelle Teilnachweise: security/WINDOWS_TRAVERSAL_VALIDATION.md, PROTECTED_REPORT_VALIDATION.md und PROTECTED_LIST_OUTPUT_VALIDATION.md.
EN: Same joint Draft355, no partial Main merge or whole R7/R8 closure. Text/other CLI/API/outer listing, target/temp/identity, verified platform/native-helper/host contracts and source-race338 remain open. Expand existing no-API native runtime checks to all four platforms; unchanged permissions and approved own-CI lock budget.
Loading