--- license: odc-by pretty_name: The Stack v3 DevOps Corpus size_categories: - 10M | distinct `license_type` values across the unit's files | | `files` | list\ | `path`, `content`, `license_type`, `detected_licenses`, `size_bytes` | | `quality` | struct | per class: template counts, stage counts, service counts, manifest kinds | | `flags` | struct | derived booleans, below | Flags worth knowing about: - `self_contained` (helm_chart): the chart does not call a helper it lacks. **72.9%** of charts qualify; the rest cannot be rendered by `helm template` on their own. - `pins_digest` / `uses_latest_tag` (dockerfile): supply-chain hygiene. - `has_unpinned_action` (workflow): actions referenced by tag or branch instead of a commit SHA. - `all_permissive`: every file in the unit is labelled `permissive`. Read the licensing section before relying on this. ## What this corpus says about real-world infrastructure Measured across every unit, not a sample: - **89.0% of Dockerfiles set no `USER`**, so the container runs as root - **98.6% of Dockerfiles declare no `HEALTHCHECK`** - **89.5% of workflows declare no `permissions`**, inheriting the default token scope - **91.1% of Compose files define no healthcheck** - 20.3% of Dockerfiles are multi-stage - Top Kubernetes kinds: Deployment, Service, Kustomization, ConfigMap, Ingress That is the baseline any model trained on public infrastructure code will imitate, which is the point of publishing it as a measurable corpus rather than a curated showcase. ## Provenance and how it was built Built with [helmcode/stack-slice](https://github.com/helmcode/stack-slice) (Apache-2.0). The corpus was surveyed and extracted **without downloading the 4.71 TB dataset**: `content` is 96.9% of every shard, so a metadata-only pass costs 1% of the bytes, and extraction streams shards over HTTP range requests without ever storing one. - Source revision: **`de81e3ca7151`** of `HuggingFaceCode/stack-v3-train` - Shards swept: **8,196 of 8,196**, covering 157.9M repositories - Forks skipped, so units come from the repository that authored them - Re-filtered for opt-out against revision **`d7bc7991ea32`** (see Licensing) Gates are content-based, never popularity-based: a chart must have parseable metadata, two or more templates and actual templating; a Terraform module must declare real blocks and not be machine-generated; an Ansible role must have a task list a parser accepts; a manifest set must have two or more manifests that load. ## Licensing, and a finding you should not skip This dataset is released under **ODC-By 1.0**, inherited from The Stack v3. **The code inside remains under its original licenses**, and `repo_path` plus `commit_id` are included on every unit precisely so attribution is possible. **The `license_type` labels are header-based, not repository-based.** In the source corpus only 3.41% of files are labelled `permissive` and 98.2% of repositories contain none at all. Apache-2.0 is detected 26,624 times against MIT's 442, which inverts their real popularity on GitHub: the Apache convention puts a license header in every source file, while MIT projects ship a single root `LICENSE`. So `license_type == permissive` means **"this file carries an inline license header"**, not "this file comes from a permissively licensed project". Two consequences: 1. Filtering to `permissive` does not give you a representative permissive corpus, it gives you an Apache-2.0-skewed slice. 2. The remaining `no_license` majority is code with **no license grant at all**, not code that is permissively licensed. Treat it accordingly. The repository-level license cannot be recovered from within The Stack v3 either: plain-text `LICENSE` files were dropped by its quality filter, so only 8 of 20,923 repositories in a sample shard ship one. A provably permissive subset needs external enrichment keyed on `repo_path`. **Opt-out.** Upstream applies opt-out removals in place and re-uploads. This dataset was re-filtered by `repo_path` against `d7bc7991ea32`, dropping 9,439 units whose repositories had been removed. If you find your code here, use the [Am I in The Stack?](https://huggingface.co/spaces/bigcode/in-the-stack) opt-out process; we re-filter on each upstream patch release. ## Known limitations - **The source corpus repeats file rows inside a repository**: 10.4% of repositories and 14.5% of all file rows, byte-identical by `content_id`. This dataset deduplicates by (path, content), removing 2,166,221 repeated files, and then **drops the 122,886 units that only met their gate because of that repetition** (a "set of two manifests" whose two manifests were the same file is not a set of two). Counts here are therefore lower than a naive extraction would report, and correctly so. Quality counters such as `templates`, `tf_files` and `manifests` are recomputed after deduplication, so they describe the files actually present. - **27.1% of Helm charts cannot render standalone** because they call helpers they do not carry. Filter on `self_contained`. - **Ansible precision is a floor, not a measurement.** "A list of mappings with Ansible-ish keys" also matches ordinary YAML lists, and role variable files are indistinguishable from any other mapping by content alone. - `manifest_set` groups manifests by directory, which is a convention, not a deployment boundary. - Stars are as of the crawl and 58-76% of units come from repositories with none. Popularity was deliberately not used as a gate; see the card's reasoning above. ## Updates and versioning Upstream applies opt-out removals in place and re-uploads the whole dataset, which means the source moves. This dataset therefore records both the revision it was extracted from and the revision it was last compliance-filtered against, and both appear above. When upstream ships a patch release we re-filter and push a new version; the extraction itself is not repeated unless the tooling changes. If you need byte-for-byte reproducibility, pin the dataset revision you loaded. ## Reproducing this dataset Everything here was produced by [helmcode/stack-slice](https://github.com/helmcode/stack-slice): ```bash # Survey the corpus for 179 MB of transfer, no download python -m stackslice.scan --shards 24 # Score the classifier against an independent YAML parser python -m stackslice.measure --shards 3 # Sweep and extract units (streams shards, stores nothing but output) python -m stackslice.extract --shards 8196 --workers 12 --out units # Re-filter for opt-out, deduplicate, add flags python -m stackslice.finalize units --out units_final \ --revision --uuid # Convert to parquet, one config per class python -m stackslice.publish units_final --out dataset ``` The full measurement record, including the findings quoted in this card, is in [FINDINGS.md](https://github.com/helmcode/stack-slice/blob/main/FINDINGS.md). ## Citation ```bibtex @misc{stack_v3_devops, title = {The Stack v3 DevOps Corpus}, author = {Helmcode}, year = {2026}, url = {https://huggingface.co/datasets/Helmcode/stack-v3-devops}, note = {Extracted from The Stack v3 with helmcode/stack-slice} } ``` Please also cite the source corpus, [The Stack v3](https://huggingface.co/datasets/HuggingFaceCode/stack-v3-train).