C / Execução registrada
File Integrity Audit
A recursive SHA-256 file inventory with size comparison and detection of additions, changes, and removals.
O que foi verificado
Os comandos abaixo executam o código do repositório e conferem os cenários registrados. A evidência cobre esses cenários na versão indicada; não comprova todas as entradas possíveis nem uso em produção.
A evidência abaixo pertence à versão registrada. A consulta usa a API pública do GitHub e pode atingir o limite de requisições.
Comandos e resultados reais
Resultados extraídos dos logs do Actions. Saídas extensas podem estar resumidas; a execução original e o artefato contêm o registro completo.
Baixar relatório JSONPASS sudo apt-get update && sudo apt-get install -y libssl-dev
Saída: 0 · esperada: 0 · 5.063 s
$ bash -e -o pipefail -c sudo apt-get update && sudo apt-get install -y libssl-dev Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B] Get:6 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3600 B] Hit:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease Get:3 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] Get:4 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB] Get:5 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease [126 kB] Get:7 https://packages.microsoft.com/ubuntu/24.04/prod noble/main armhf Packages [12.3 kB] Get:8 https://packages.microsoft.com/ubuntu/24.04/prod noble/main arm64 Packages [492 kB] Get:9 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 Packages [548 kB] Get:10 https://packages.microsoft.com/ubuntu/24.04/prod noble/main all Packages [640 B] Get:11 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1375 kB] Get:12 http://azure.archive.ubuntu.com/ubuntu noble-updates/main Translation-en [306 kB] Get:13 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1702 kB] Get:14 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [342 kB] Get:15 http://azure.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [1761 kB] Get:16 http://azure.archive.ubuntu.com/ubuntu noble-updates/restricted Translation-en [401 kB] Get:17 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [55.0 kB] Get:18 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse Translation-en [14.3 kB] Get:19 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [1121 kB] Get:20 http://azure.archive.ubuntu.com/ubuntu noble-security/main Translation-en [228 kB] Get:21 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1220 kB] Get:22 http://azure.archive.ubuntu.com/ubuntu noble-security/universe Translation-en [245 kB] Get:23 http://azure.archive.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [1669 kB] Get:24 http://azure.archive.ubuntu.com/ubuntu noble-security/restricted Translation-en [383 kB] Get:25 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [49.8 kB] Get:26 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse Translation-en [12.4 kB] Fetched 12.3 MB in 1s (8808 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... libssl-dev is already the newest version (3.0.13-0ubuntu3.16). 0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
PASS make
Saída: 0 · esperada: 0 · 0.802 s
$ bash -e -o pipefail -c make mkdir -p build cc -std=c17 -O2 -Wall -Wextra -Wpedantic -Werror src/main.c -o build/integrity -lcrypto
PASS Detect a real file modification against SHA-256 baseline
Saída: 0 · esperada: 0 · 0.051 s
$ python .proof/demo.py
{"baseline": {"added": 0, "changed": 0, "files": 1, "removed": 0, "valid": true}, "tampered": {"added": 0, "changed": 1, "files": 1, "removed": 0, "valid": false}}
Reproduzir a execução
Os pré-requisitos e as entradas são públicos no repositório. Faça checkout da versão exata antes de executar os cenários.
git clone https://github.com/brunnojob/c-file-integrity-audit.git cd c-file-integrity-audit git checkout 8937d3269cd0bb9393fcbcbb02c5985f579b43d5 python .proof/record.py