Borrowing it
Nothing to install: this file belongs to konstruktoid/hardened-images. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/konstruktoid/hardened-images/master/CLAUDE.mdgit clone --depth 1 https://github.com/konstruktoid/hardened-imagesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/konstruktoid/hardened-images/claude-md)<a href="https://agentmods.dev/instructions/konstruktoid/hardened-images/claude-md"><img src="https://agentmods.dev/badge/instructions/konstruktoid/hardened-images/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/konstruktoid/hardened-images/claude-md"><img src="https://agentmods.dev/badge/instructions/konstruktoid/hardened-images/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02736 | $0.02736 |
| Opus 5 | $0.01368 | $0.01368 |
| Sonnet 5 | $0.00547 | $0.00547 |
| Haiku 4.5 | $0.00274 | $0.00274 |
Grade B, and why
hardened-images CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
the script. The sudo password travels the same way, as `SUDO_PASSWORD` in Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
actions by SHA, no curl-pipe-to-shell, explicit `timeout-minutes`/`concurrency`). How it starts
The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project overview
hardened-images builds hardened Ubuntu server images using
Packer templates. Targets are an
Azure virtual machine image
and a local QEMU .qcow2 disk image (a former .ova
target is documented in git history only). The QEMU target starts from the
official Ubuntu cloud image; Ubuntu 26.04 LTS (Resolute Raccoon) is the default.
Hardening is applied by the external
konstruktoid/ansible-collection-hardening
Ansible collection. The collection code is external; it is installed and configured by the Ansible playbook in config/local.yml
(with settings from config/ansible.cfg). The collection has no umbrella role,
so the playbook's role list is the hardening scope.
Commands
bash build_box.sh— builds the local.qcow2image: generates a throwaway SSH keypair, boots the official Ubuntu cloud image in QEMU, configures it on first boot from the NoCloudcidataseed inseed/user-data.pkrtpl.hcl, provisions with thekonstruktoid.hardeningcollection, generates an SBOM (scripts/sbom.sh, Syft) and then strips the ephemeral keypair (scripts/cleanup.sh, always last). Extra args are passed through topacker build, e.g.bash build_box.sh -var 'ssh_authorized_keys=["ssh-ed25519 ..."]'. That variable is what makes the built image reachable over SSH at all:config/local.ymlsetssshd_password_authentication: falseandscripts/cleanup.shstrips the ephemeral keypair, so an image built without it is only reachable on the console, with the build password. Output (.qcow2,.spdx.json,.cdx.json,CHECKSUMS) lands under a timestamped subdirectory ofoutput/.packer init -upgrade ubuntu-hardened-azure.pkr.hcl/packer validate .../packer build ...— Azure image build. Requires Azure credentials; seeazure_vars_exportandscripts/azure.sh.shellcheck -x -s bash -f gcc build_box.sh run_qemu.sh azure_vars_export scripts/*.sh tools/*.sh— required to pass;build_box.shruns exactly this list itself.packer fmt -check -diff .andpacker validatemust both pass for any.pkr.hclchange.build_box.shrunspacker validatebeforepacker build.pre-commit run --all-files—gitleaks,shellcheck,ansible-lint,packer fmt,detect-private-key, and the pre-commit-hooks hygiene set..github/workflows/lint.ymlrunsshellcheck,bash -n,packer fmt/validateandansible-lintin CI, plusactionlintandzizmorover the workflows.gitleaks,detect-private-keyand the hygiene hooks run inpre-commitonly.bash tools/vendor-agent-standards.sh— re-vendorsinstructions/and.agents/skills/from the pinned upstream ref, verifying that the ref still resolves to the pinned commit before it replaces anything.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed · +4 lines · +67 tokens per session 63499ce719bf
- 7d ago Changed · +24 lines · +432 tokens per session d7262279c925
- 11d ago First seen · 141 lines · 2,237 tokens per session scan B 1fa88c440b36
hardened-images CLAUDE.md is an instructions file published in the GitHub repository konstruktoid/hardened-images (90 stars, last pushed 3d ago), licensed Apache-2.0. It adds 2,736 tokens to every session, about $0.0137 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.