{"id":36892236,"url":"https://github.com/transparency-dev/armored-witness-os","last_synced_at":"2026-01-12T15:38:37.701Z","repository":{"id":161491181,"uuid":"617002302","full_name":"transparency-dev/armored-witness-os","owner":"transparency-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-22T05:06:17.000Z","size":2744,"stargazers_count":4,"open_issues_count":11,"forks_count":7,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-12-23T16:50:31.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/transparency-dev/armored-witness","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transparency-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-21T14:07:10.000Z","updated_at":"2025-12-15T14:44:07.000Z","dependencies_parsed_at":"2023-09-23T02:51:19.350Z","dependency_job_id":"7a9848f4-a691-4d7b-92e7-058c1f0ff062","html_url":"https://github.com/transparency-dev/armored-witness-os","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/transparency-dev/armored-witness-os","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transparency-dev%2Farmored-witness-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transparency-dev%2Farmored-witness-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transparency-dev%2Farmored-witness-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transparency-dev%2Farmored-witness-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transparency-dev","download_url":"https://codeload.github.com/transparency-dev/armored-witness-os/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transparency-dev%2Farmored-witness-os/sbom","scorecard":{"id":359331,"data":{"date":"2025-08-18T08:36:13Z","repo":{"name":"github.com/transparency-dev/armored-witness-os","commit":"ceddf48b133484434f6a42780822db162456f34d"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":7.5,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/pr_build.yml:6","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating golang:1.24-bookworm to golang:1.24-bookworm@sha256:e617461712dbebf8768e10c1a5deab2833d67d2b692894cb8f4f0a3c19a8efb5","Warn: goCommand not pinned by hash: .github/workflows/pr_build.yml:32","Info:   4 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":9,"reason":"SAST tool is not run on all commits -- score normalized to 9","details":["Warn: 28 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Contributors","score":6,"reason":"project has 2 contributing companies or organizations -- score normalized to 6","details":["Info: found contributions from: google, usbarmory"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"30 out of 30 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-08-18T10:23:06.301Z","repository_id":161491181,"created_at":"2025-08-18T10:23:06.301Z","updated_at":"2025-08-18T10:23:06.301Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T15:38:33.274Z","updated_at":"2026-01-12T15:38:37.691Z","avatar_url":"https://github.com/transparency-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArmoredWitness Trusted OS\n\n## Introduction\n\nTODO.\n\n## Supported hardware\n\nThe following table summarizes currently supported SoCs and boards.\n\n| SoC          | Board                                                               | SoC package                                                              | Board package                                                                    |\n|--------------|---------------------------------------------------------------------|--------------------------------------------------------------------------|----------------------------------------------------------------------------------|\n| NXP i.MX6UL  | [USB armory Mk II LAN](https://github.com/usbarmory/usbarmory/wiki) | [imx6ul](https://github.com/usbarmory/tamago/tree/master/soc/nxp/imx6ul) | [usbarmory/mk2](https://github.com/usbarmory/tamago/tree/master/board/usbarmory) |\n| NXP i.MX6ULL | [USB armory Mk II](https://github.com/usbarmory/usbarmory/wiki)     | [imx6ul](https://github.com/usbarmory/tamago/tree/master/soc/nxp/imx6ul) | [usbarmory/mk2](https://github.com/usbarmory/tamago/tree/master/board/usbarmory) |\n\n## Purpose\n\nThis trusted OS is a [TamaGo](https://github.com/usbarmory/tamago) unikernel\nintended to run on the board(s) listed above in the TrustZone Secure World\nsystem mode, to be used in conjuction with the counterpart\n[witness trusted applet](https://github.com/transparency-dev/armored-witness-applet)\n unikernel running in the Secure World user mode.\n\nThe GoTEE [syscall](https://github.com/usbarmory/GoTEE/blob/master/syscall/syscall.go)\ninterface is implemented for communication between the Trusted OS and Trusted\nApplet.\n\nThe trusted OS can be also executed under QEMU emulation, including networking\nsupport (requires a `tap0` device routing the Trusted Applet IP address).\n\n\u003e :warning: emulated runs perform partial tests due to lack of full hardware\n\u003e support by QEMU.\n\n```bash\nmake DEBUG=1 FAKE_STORAGE=1 BEE=0 trusted_os_embedded_applet log_os qemu\n...\n00:00:00 tamago/arm • TEE security monitor (Secure World system/monitor)\n00:00:00 SM applet verification\n00:00:01 SM applet verified\n00:00:01 SM loaded applet addr:0x90000000 entry:0x9007751c size:14228514\n00:00:01 SM starting mode:USR sp:0xa0000000 pc:0x9007751c ns:false\n00:00:02 tamago/arm • TEE user applet\n00:00:02 TA MAC:1a:55:89:a2:69:41 IP:10.0.0.1 GW:10.0.0.2 DNS:8.8.8.8:53\n00:00:02 TA requesting SM status\n00:00:02 ----------------------------------------------------------- Trusted OS ----\n00:00:02 Secure Boot ............: false\n00:00:02 Runtime ................: tamago/arm\n00:00:02 Link ...................: false\n00:00:02 TA starting ssh server (SHA256:eeMIwwN/zw1ov1BvO6sW3wtYi463sq+oLgKhmAew1WE) at 10.0.0.1:22\n```\n\n\n\n## Trusted OS signing\n\nFor an overview of the firmware authentication process please see\n\u003chttps://github.com/transparency-dev/armored-witness/tree/main/docs/firmware_auth.md\u003e.\n\nTo maintain the chain of trust the Trusted OS must be signed and logged.\nTo this end, two [note](https://pkg.go.dev/golang.org/x/mod/sumdb/note) signing keys\nmust be generated.\n\n```bash\n$ go run github.com/transparency-dev/serverless-log/cmd/generate_keys@HEAD \\\n  --key_name=\"DEV-TrustedOS-1\" \\\n  --out_priv=armored-witness-os-1.sec \\\n  --out_pub=armored-witness-os-1.pub\n$ go run github.com/transparency-dev/serverless-log/cmd/generate_keys@HEAD \\\n  --key_name=\"DEV-TrustedOS-2\" \\\n  --out_priv=armored-witness-os-2.sec \\\n  --out_pub=armored-witness-os-2.pub\n```\n\nThe corresponding public key files will be built into the bootloader to verify the OS.\n\n## Trusted Applet authentication\n\nTo maintain the chain of trust the OS performs trusted applet authentication\nbefore executing it. This includes verifying signatures and Firmware Transparency\nartefacts produced when the applet was built.\n\n## Firmware transparency\n\nAll ArmoredWitness firmware artefacts need to be added to a firmware transparency log.\n\nThe provided `Makefile` has support for maintaining a local firmware transparency\nlog on disk. This is intended to be used for development only.\n\nIn order to use this functionality, a log key pair can be generated with the\nfollowing command:\n\n```bash\n$ go run github.com/transparency-dev/serverless-log/cmd/generate_keys@HEAD \\\n  --key_name=\"DEV-Log\" \\\n  --out_priv=armored-witness-log.sec \\\n  --out_pub=armored-witness-log.pub\n```\n\n## Building and executing on ARM targets\n\nDownload and install the\n[latest TamaGo binary release](https://github.com/usbarmory/tamago-go/releases/latest).\n\n### Building the OS\n\nEnsure the following environment variables are set:\n\n| Variable            | Description\n|---------------------|------------\n| `OS_PRIVATE_KEY1`   | Path to OS firmware signing key 1. Used by the Makefile to sign the OS.\n| `OS_PRIVATE_KEY2`   | Path to OS firmware signing key 2. Used by the Makefile to sign the OS.\n| `APPLET_PUBLIC_KEY` | Path to applet firmware verification key. Embedded into the OS to verify the applet at run-time.\n| `LOG_PUBLIC_KEY`    | Path to log verification key. Embedded into the OS to verify at run-time that the applet is correctly logged.\n| `LOG_ORIGIN`        | FT log origin string. Embedded into the OS to verify applet firmware transparency.\n| `LOG_PRIVATE_KEY`   | Path to log signing key. Used by Makefile to add the new OS firmware to the local dev log.\n| `DEV_LOG_DIR`       | Path to directory in which to store the dev FT log files.\n\nThe OS firmware image can then be built, signed, and logged with the following command:\n\n```bash\n# The trusted_os target builds the firmware image, and log_os target adds it\n# to the local firmware transparency log.\nmake trusted_os log_os\n```\n\nThe final executable, `trusted_os.elf` is created in the `bin` subdirectory, and\nshould be used for loading through `armored-witness-boot`.\n\nFirmware transparency artefacts will be written into `${DEV_LOG_DIR}`.\n\n### Development builds\n\nTo aid in development, it is also possible to build the OS with the Trusted Applet\ndirectly embedded within it:\n\n```bash\nmake trusted_os_embedded_applet\n```\n\nThe resulting `bin/trusted_os.elf` may be seral booted directly to the device with\nthe `imx_boot` tool, or similar.\nNote that since this OS image is not being loaded via the bootloader, it does not need\nto be added to the FT log.\n\n#### Optional development environment variables\n\nThe following environment variables may be set when compiling the Trusted OS image in order\nto add extra debugging support to the resulting image:\n\n| Variable         | Description\n|------------------|------------\n| `DEBUG`          | When set to `1`, enables output of logging, stdout, etc. See #debugging section below for more details\n| `FAKE_STORAGE`   | When set to `1`, provides a storage card implementation which passes-through to SDCard on native hardware, but uses RAM to emulate an SDCard otherwise.\n\n### Encrypted RAM support\n\nOnly on i.MX6UL P/Ns, the `BEE` environment variable must be set to match\n`armored-witness-boot` compilation options in case AES CTR encryption for all\nexternal RAM, using TamaGo [bee package](https://pkg.go.dev/github.com/usbarmory/tamago/soc/nxp/bee),\nis configured at boot.\n\nThe following targets are available:\n\n| `TARGET`    | Board            | Executing and debugging                                                                                  |\n|-------------|------------------|----------------------------------------------------------------------------------------------------------|\n| `usbarmory` | UA-MKII-LAN      | [usbarmory/mk2](https://github.com/usbarmory/tamago/tree/master/board/usbarmory)                         |\n\nThe targets support native (see relevant documentation links in the table above)\nas well as emulated execution (e.g. `make qemu`).\n\n## Debugging\n\nAn optional Serial over USB console can be used to access Trusted OS and\nTrusted Applet logs, it can be enabled when compiling with the `DEBUG`\nenvironment variable set:\n\n```bash\nmake DEBUG=1 trusted_os\n```\n\nThe Serial over USB console can be accessed from a Linux host as follows:\n\n```bash\npicocom -b 115200 -eb /dev/ttyACM0 --imap lfcrlf\n```\n\n### QEMU\n\nThe Trusted OS image can be executed under emulation as follows:\n\n```bash\nmake qemu\n```\n\nNote that emulated MMC storage is not currently supported, so the Trusted OS should\nbe built with the `FAKE_STORAGE` environment variable set to `1`:\n\n```bash\nmake DEBUG=1 FAKE_STORAGE=1 trusted_os\n```\n\nThe emulation run network connectivity should be configured as follows (Linux\nexample with tap0):\n\n```bash\nip addr add 10.0.0.2/24 dev tap0\nip link set tap0 up\nip tuntap add dev tap0 mode tap group \u003cyour user group\u003e\n```\n\nThe emulated target can be debugged with GDB using `make qemu-gdb`, this will\nmake qemu waiting for a GDB connection that can be launched as follows:\n\n```bash\narm-none-eabi-gdb -ex \"target remote 127.0.0.1:1234\" example\n```\n\nBreakpoints can be set in the usual way:\n\n```none\nb ecdsa.GenerateKey\ncontinue\n```\n\n## Trusted Applet installation\n\nInstalling the various firmware images onto the device can be accomplished using the\n[provision](https://github.com/transparency-dev/armored-witness/tree/main/cmd/provision)\ntool.\n\n## LED status\n\nThe [USB armory Mk II](https://github.com/usbarmory/usbarmory/wiki) LEDs\nare used, in sequence, as follows:\n\n| Boot sequence                   | Blue | White |\n|---------------------------------|------|-------|\n| 0. initialization               | off  | off   |\n| 1. trusted applet verified      | off  | on    |\n| 2. trusted applet execution     | on   | on    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransparency-dev%2Farmored-witness-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransparency-dev%2Farmored-witness-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransparency-dev%2Farmored-witness-os/lists"}