Metadata-Version: 2.4
Name: infra-provision-check
Version: 0.1.0
Summary: Read your Terraform and docker-compose files and print, beside each setting they state, the published provision that speaks to it — NIST SP 800-53 Rev 5 and the HIPAA Security Rule, quoted verbatim with the citation and the source URL. Never says your system is or is not compliant, and always exits 0
Author: referencesource.org
License: CC0-1.0
Project-URL: Homepage, https://referencesource.org/security-compliance-controls/
Project-URL: Source, https://referencesource.org/security-compliance-controls/
Keywords: compliance,terraform,docker-compose,hipaa,nist,sp800-53,security,iac,infrastructure-as-code,audit,ci,encryption,provisions,controls,citation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Legal Industry
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# infra-provision-check

Read your Terraform and `docker-compose` files, and print beside each setting
they state the **published provision that speaks to it** — NIST SP 800-53
Rev 5 and the HIPAA Security Rule, quoted verbatim, with the citation, the
source URL and the day we read it.

```
pipx run infra-provision-check          # no install
pip install infra-provision-check       # or install it
infra-provision-check
```

It **never says your system is or is not compliant**, it prints no score, and
it **always exits 0**.

---

## What it prints

```
ENCRYPTION OF INFORMATION AT REST — 2 reading(s)

  infra/main.tf:1  aws_s3_bucket.data
      this block is an S3 bucket and states no
      `server_side_encryption_configuration`, and no
      `aws_s3_bucket_server_side_encryption_configuration` resource appears
      in the files read.

  infra/main.tf:28  aws_ebs_volume.scratch
      this block is an EBS volume and sets `encrypted = false`.

  The published provisions that speak to protecting information at rest, in
  their publishers' own words:

    NIST SP 800-53 Rev 5.2.0 SC-28 — Protection of Information at Rest
      "Protect the {{ insert: param, sc-28_odp.01 }} of the following
      information at rest: {{ insert: param, sc-28_odp.02 }}."
      with its parameters named, as NIST's own rendering prints it: Protect
      the [Selection (one or more): confidentiality; integrity] of the
      following information at rest: [Assignment: organization-defined
      information at rest].
      — https://raw.githubusercontent.com/usnistgov/oscal-content/...
        read 2026-11-15
      — our record: https://referencesource.org/security-compliance-controls/sc-28/

    HIPAA Security Rule (45 CFR part 164, subpart C) 164.312(a)(2)(iv)
      "(iv) Encryption and decryption (Addressable). Implement a mechanism to
      encrypt and decrypt electronic protected health information."
      ...
```

Two facts side by side: a statement about **the text of a file**, which you can
check by opening the file, and the **publisher's own sentence** about that
subject, which you can check against the URL under it. Joining them into
"therefore you are non-compliant" is your job, or your auditor's. It is not
this program's.

## The five things it reads

In `.tf`, `.tfvars` and `docker-compose*.yml` / `compose*.yml` files only.

| # | What it reads | The subject it quotes |
|---|---|---|
| 1 | a storage resource that states no encryption-at-rest setting, or sets it to `false` | encryption of information at rest — SC-28, 45 CFR 164.312(a)(2)(iv) |
| 2 | a DB parameter group, or a database service in compose, whose own definition names no transport-encryption setting | encryption in transit — SC-8, 45 CFR 164.312(e)(2)(ii) |
| 3 | a log group, and what retention period it states | audit records and how long they are kept — AU-11, 45 CFR 164.312(b) |
| 4 | a bucket whose own setting makes it reachable by anyone | access enforcement and publicly accessible content — AC-3, AC-22c, 45 CFR 164.312(a)(1) |
| 5 | a credential written into the file as a literal | authenticators in static storage — IA-5(7), 45 CFR 164.308(a)(5)(ii)(D) |

**The value of a credential it finds is never printed.** This output goes into
build logs; a scanner that echoes the secret it found has published it a second
time. You get the key, the file and the line.

Resource types read: `aws_s3_bucket`, `aws_s3_bucket_acl`,
`aws_s3_bucket_policy`, `aws_s3_bucket_public_access_block`, `aws_ebs_volume`,
`aws_db_instance`, `aws_rds_cluster`, `aws_db_parameter_group`,
`aws_rds_cluster_parameter_group`, `aws_dynamodb_table`,
`aws_efs_file_system`, `aws_elasticache_replication_group`,
`aws_cloudwatch_log_group`, `google_storage_bucket`,
`google_logging_project_bucket_config`, `google_storage_bucket_iam_member`,
`google_storage_bucket_iam_binding`, `google_storage_bucket_access_control`.
`--json` prints the list, so what a silence means is machine-readable.

## What it does not claim

**"Not in this file" is not "not in your system."** A setting absent from a
Terraform block may be set by a module default, by a separate resource, by the
provider's own default, or by an account-wide policy. This reads none of those
and makes no claim about them. Where the commonest correct way to write
something puts the setting in a *different* resource — bucket encryption, since
AWS provider v4 — a sibling resource of that type anywhere in the files read
suppresses the reading rather than reporting it as an absence.

**Silence is not coverage.** It reads five settings and the resource types
listed above. A resource type it does not read, a format it does not read, and
a setting stated somewhere it cannot see all look like a clean run.

## SOC 2, ISO 27001 and PCI DSS

They are not here, and the reason is worth saying rather than leaving as a gap.
The AICPA Trust Services Criteria (SOC 2), ISO/IEC 27001 and PCI DSS are **sold
under licence** by the bodies that publish them, so not one sentence of them is
in our records, in this package, or in its output.

What is quoted is NIST SP 800-53 Rev 5 and the HIPAA Security Rule — both
United States Government works in the public domain, both free to read at the
URL printed under every quote.

## Where the provisions come from

Every sentence this tool prints is one record in
[referencesource.org/security-compliance-controls](https://referencesource.org/out/pkg/infra-provision-check/)
— 2,000-odd provisions of NIST SP 800-53 Rev 5 and the HIPAA Security Rule, cut
one obligation at a time from NIST's own OSCAL catalogue and the eCFR's XML,
each carrying the publisher's words verbatim and the API URL it was cut from.
The package ships them in a data file generated from those records, so there is
no network call and no API key; `--json` carries the record page for each
provision so you can check us.

Provisions are re-checked against their source pages on a schedule, and each
one prints the day it was last read and the day it is next due.

## Not advice

> This quotes published rules. It is not legal or compliance advice and does not
> tell you whether your system complies.

## Licence

CC0-1.0. The quoted provisions are United States Government works in the public
domain.
