infra-provision-check 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ CC0 1.0 Universal — Public Domain Dedication
2
+
3
+ The person who associated a work with this deed has dedicated the work to the
4
+ public domain by waiving all of his or her rights to the work worldwide under
5
+ copyright law, including all related and neighboring rights, to the extent
6
+ allowed by law.
7
+
8
+ You can copy, modify, distribute and perform the work, even for commercial
9
+ purposes, all without asking permission.
10
+
11
+ Full text: https://creativecommons.org/publicdomain/zero/1.0/legalcode
12
+
13
+ ---
14
+
15
+ This dedication covers the compilation and the code in this package.
16
+
17
+ The underlying facts are taken from third-party sources, each of which is cited
18
+ by URL in the shipped data alongside the verbatim quote the value was read from:
19
+
20
+ * PyTorch's RELEASE.md and .ci/manywheel/build_cuda.sh — BSD-3-Clause
21
+ (pytorch/pytorch LICENSE)
22
+ * NVIDIA's CUDA Toolkit release notes and CUDA GPUs page — vendor technical
23
+ documentation
24
+
25
+ Facts are not copyrightable. What is reproduced from those sources is a fact
26
+ plus a short attributed quote linking back to it; neither document is
27
+ reproduced.
@@ -0,0 +1 @@
1
+ include src/infra_provision_check/data.json
@@ -0,0 +1,153 @@
1
+ Metadata-Version: 2.4
2
+ Name: infra-provision-check
3
+ Version: 0.1.0
4
+ 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
5
+ Author: referencesource.org
6
+ License: CC0-1.0
7
+ Project-URL: Homepage, https://referencesource.org/security-compliance-controls/
8
+ Project-URL: Source, https://referencesource.org/security-compliance-controls/
9
+ Keywords: compliance,terraform,docker-compose,hipaa,nist,sp800-53,security,iac,infrastructure-as-code,audit,ci,encryption,provisions,controls,citation
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Legal Industry
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Security
15
+ Classifier: Topic :: Software Development :: Quality Assurance
16
+ Classifier: Topic :: System :: Systems Administration
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Dynamic: license-file
21
+
22
+ # infra-provision-check
23
+
24
+ Read your Terraform and `docker-compose` files, and print beside each setting
25
+ they state the **published provision that speaks to it** — NIST SP 800-53
26
+ Rev 5 and the HIPAA Security Rule, quoted verbatim, with the citation, the
27
+ source URL and the day we read it.
28
+
29
+ ```
30
+ pipx run infra-provision-check # no install
31
+ pip install infra-provision-check # or install it
32
+ infra-provision-check
33
+ ```
34
+
35
+ It **never says your system is or is not compliant**, it prints no score, and
36
+ it **always exits 0**.
37
+
38
+ ---
39
+
40
+ ## What it prints
41
+
42
+ ```
43
+ ENCRYPTION OF INFORMATION AT REST — 2 reading(s)
44
+
45
+ infra/main.tf:1 aws_s3_bucket.data
46
+ this block is an S3 bucket and states no
47
+ `server_side_encryption_configuration`, and no
48
+ `aws_s3_bucket_server_side_encryption_configuration` resource appears
49
+ in the files read.
50
+
51
+ infra/main.tf:28 aws_ebs_volume.scratch
52
+ this block is an EBS volume and sets `encrypted = false`.
53
+
54
+ The published provisions that speak to protecting information at rest, in
55
+ their publishers' own words:
56
+
57
+ NIST SP 800-53 Rev 5.2.0 SC-28 — Protection of Information at Rest
58
+ "Protect the {{ insert: param, sc-28_odp.01 }} of the following
59
+ information at rest: {{ insert: param, sc-28_odp.02 }}."
60
+ with its parameters named, as NIST's own rendering prints it: Protect
61
+ the [Selection (one or more): confidentiality; integrity] of the
62
+ following information at rest: [Assignment: organization-defined
63
+ information at rest].
64
+ — https://raw.githubusercontent.com/usnistgov/oscal-content/...
65
+ read 2026-11-15
66
+ — our record: https://referencesource.org/security-compliance-controls/sc-28/
67
+
68
+ HIPAA Security Rule (45 CFR part 164, subpart C) 164.312(a)(2)(iv)
69
+ "(iv) Encryption and decryption (Addressable). Implement a mechanism to
70
+ encrypt and decrypt electronic protected health information."
71
+ ...
72
+ ```
73
+
74
+ Two facts side by side: a statement about **the text of a file**, which you can
75
+ check by opening the file, and the **publisher's own sentence** about that
76
+ subject, which you can check against the URL under it. Joining them into
77
+ "therefore you are non-compliant" is your job, or your auditor's. It is not
78
+ this program's.
79
+
80
+ ## The five things it reads
81
+
82
+ In `.tf`, `.tfvars` and `docker-compose*.yml` / `compose*.yml` files only.
83
+
84
+ | # | What it reads | The subject it quotes |
85
+ |---|---|---|
86
+ | 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) |
87
+ | 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) |
88
+ | 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) |
89
+ | 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) |
90
+ | 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) |
91
+
92
+ **The value of a credential it finds is never printed.** This output goes into
93
+ build logs; a scanner that echoes the secret it found has published it a second
94
+ time. You get the key, the file and the line.
95
+
96
+ Resource types read: `aws_s3_bucket`, `aws_s3_bucket_acl`,
97
+ `aws_s3_bucket_policy`, `aws_s3_bucket_public_access_block`, `aws_ebs_volume`,
98
+ `aws_db_instance`, `aws_rds_cluster`, `aws_db_parameter_group`,
99
+ `aws_rds_cluster_parameter_group`, `aws_dynamodb_table`,
100
+ `aws_efs_file_system`, `aws_elasticache_replication_group`,
101
+ `aws_cloudwatch_log_group`, `google_storage_bucket`,
102
+ `google_logging_project_bucket_config`, `google_storage_bucket_iam_member`,
103
+ `google_storage_bucket_iam_binding`, `google_storage_bucket_access_control`.
104
+ `--json` prints the list, so what a silence means is machine-readable.
105
+
106
+ ## What it does not claim
107
+
108
+ **"Not in this file" is not "not in your system."** A setting absent from a
109
+ Terraform block may be set by a module default, by a separate resource, by the
110
+ provider's own default, or by an account-wide policy. This reads none of those
111
+ and makes no claim about them. Where the commonest correct way to write
112
+ something puts the setting in a *different* resource — bucket encryption, since
113
+ AWS provider v4 — a sibling resource of that type anywhere in the files read
114
+ suppresses the reading rather than reporting it as an absence.
115
+
116
+ **Silence is not coverage.** It reads five settings and the resource types
117
+ listed above. A resource type it does not read, a format it does not read, and
118
+ a setting stated somewhere it cannot see all look like a clean run.
119
+
120
+ ## SOC 2, ISO 27001 and PCI DSS
121
+
122
+ They are not here, and the reason is worth saying rather than leaving as a gap.
123
+ The AICPA Trust Services Criteria (SOC 2), ISO/IEC 27001 and PCI DSS are **sold
124
+ under licence** by the bodies that publish them, so not one sentence of them is
125
+ in our records, in this package, or in its output.
126
+
127
+ What is quoted is NIST SP 800-53 Rev 5 and the HIPAA Security Rule — both
128
+ United States Government works in the public domain, both free to read at the
129
+ URL printed under every quote.
130
+
131
+ ## Where the provisions come from
132
+
133
+ Every sentence this tool prints is one record in
134
+ [referencesource.org/security-compliance-controls](https://referencesource.org/out/pkg/infra-provision-check/)
135
+ — 2,000-odd provisions of NIST SP 800-53 Rev 5 and the HIPAA Security Rule, cut
136
+ one obligation at a time from NIST's own OSCAL catalogue and the eCFR's XML,
137
+ each carrying the publisher's words verbatim and the API URL it was cut from.
138
+ The package ships them in a data file generated from those records, so there is
139
+ no network call and no API key; `--json` carries the record page for each
140
+ provision so you can check us.
141
+
142
+ Provisions are re-checked against their source pages on a schedule, and each
143
+ one prints the day it was last read and the day it is next due.
144
+
145
+ ## Not advice
146
+
147
+ > This quotes published rules. It is not legal or compliance advice and does not
148
+ > tell you whether your system complies.
149
+
150
+ ## Licence
151
+
152
+ CC0-1.0. The quoted provisions are United States Government works in the public
153
+ domain.
@@ -0,0 +1,132 @@
1
+ # infra-provision-check
2
+
3
+ Read your Terraform and `docker-compose` files, and print beside each setting
4
+ they state the **published provision that speaks to it** — NIST SP 800-53
5
+ Rev 5 and the HIPAA Security Rule, quoted verbatim, with the citation, the
6
+ source URL and the day we read it.
7
+
8
+ ```
9
+ pipx run infra-provision-check # no install
10
+ pip install infra-provision-check # or install it
11
+ infra-provision-check
12
+ ```
13
+
14
+ It **never says your system is or is not compliant**, it prints no score, and
15
+ it **always exits 0**.
16
+
17
+ ---
18
+
19
+ ## What it prints
20
+
21
+ ```
22
+ ENCRYPTION OF INFORMATION AT REST — 2 reading(s)
23
+
24
+ infra/main.tf:1 aws_s3_bucket.data
25
+ this block is an S3 bucket and states no
26
+ `server_side_encryption_configuration`, and no
27
+ `aws_s3_bucket_server_side_encryption_configuration` resource appears
28
+ in the files read.
29
+
30
+ infra/main.tf:28 aws_ebs_volume.scratch
31
+ this block is an EBS volume and sets `encrypted = false`.
32
+
33
+ The published provisions that speak to protecting information at rest, in
34
+ their publishers' own words:
35
+
36
+ NIST SP 800-53 Rev 5.2.0 SC-28 — Protection of Information at Rest
37
+ "Protect the {{ insert: param, sc-28_odp.01 }} of the following
38
+ information at rest: {{ insert: param, sc-28_odp.02 }}."
39
+ with its parameters named, as NIST's own rendering prints it: Protect
40
+ the [Selection (one or more): confidentiality; integrity] of the
41
+ following information at rest: [Assignment: organization-defined
42
+ information at rest].
43
+ — https://raw.githubusercontent.com/usnistgov/oscal-content/...
44
+ read 2026-11-15
45
+ — our record: https://referencesource.org/security-compliance-controls/sc-28/
46
+
47
+ HIPAA Security Rule (45 CFR part 164, subpart C) 164.312(a)(2)(iv)
48
+ "(iv) Encryption and decryption (Addressable). Implement a mechanism to
49
+ encrypt and decrypt electronic protected health information."
50
+ ...
51
+ ```
52
+
53
+ Two facts side by side: a statement about **the text of a file**, which you can
54
+ check by opening the file, and the **publisher's own sentence** about that
55
+ subject, which you can check against the URL under it. Joining them into
56
+ "therefore you are non-compliant" is your job, or your auditor's. It is not
57
+ this program's.
58
+
59
+ ## The five things it reads
60
+
61
+ In `.tf`, `.tfvars` and `docker-compose*.yml` / `compose*.yml` files only.
62
+
63
+ | # | What it reads | The subject it quotes |
64
+ |---|---|---|
65
+ | 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) |
66
+ | 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) |
67
+ | 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) |
68
+ | 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) |
69
+ | 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) |
70
+
71
+ **The value of a credential it finds is never printed.** This output goes into
72
+ build logs; a scanner that echoes the secret it found has published it a second
73
+ time. You get the key, the file and the line.
74
+
75
+ Resource types read: `aws_s3_bucket`, `aws_s3_bucket_acl`,
76
+ `aws_s3_bucket_policy`, `aws_s3_bucket_public_access_block`, `aws_ebs_volume`,
77
+ `aws_db_instance`, `aws_rds_cluster`, `aws_db_parameter_group`,
78
+ `aws_rds_cluster_parameter_group`, `aws_dynamodb_table`,
79
+ `aws_efs_file_system`, `aws_elasticache_replication_group`,
80
+ `aws_cloudwatch_log_group`, `google_storage_bucket`,
81
+ `google_logging_project_bucket_config`, `google_storage_bucket_iam_member`,
82
+ `google_storage_bucket_iam_binding`, `google_storage_bucket_access_control`.
83
+ `--json` prints the list, so what a silence means is machine-readable.
84
+
85
+ ## What it does not claim
86
+
87
+ **"Not in this file" is not "not in your system."** A setting absent from a
88
+ Terraform block may be set by a module default, by a separate resource, by the
89
+ provider's own default, or by an account-wide policy. This reads none of those
90
+ and makes no claim about them. Where the commonest correct way to write
91
+ something puts the setting in a *different* resource — bucket encryption, since
92
+ AWS provider v4 — a sibling resource of that type anywhere in the files read
93
+ suppresses the reading rather than reporting it as an absence.
94
+
95
+ **Silence is not coverage.** It reads five settings and the resource types
96
+ listed above. A resource type it does not read, a format it does not read, and
97
+ a setting stated somewhere it cannot see all look like a clean run.
98
+
99
+ ## SOC 2, ISO 27001 and PCI DSS
100
+
101
+ They are not here, and the reason is worth saying rather than leaving as a gap.
102
+ The AICPA Trust Services Criteria (SOC 2), ISO/IEC 27001 and PCI DSS are **sold
103
+ under licence** by the bodies that publish them, so not one sentence of them is
104
+ in our records, in this package, or in its output.
105
+
106
+ What is quoted is NIST SP 800-53 Rev 5 and the HIPAA Security Rule — both
107
+ United States Government works in the public domain, both free to read at the
108
+ URL printed under every quote.
109
+
110
+ ## Where the provisions come from
111
+
112
+ Every sentence this tool prints is one record in
113
+ [referencesource.org/security-compliance-controls](https://referencesource.org/out/pkg/infra-provision-check/)
114
+ — 2,000-odd provisions of NIST SP 800-53 Rev 5 and the HIPAA Security Rule, cut
115
+ one obligation at a time from NIST's own OSCAL catalogue and the eCFR's XML,
116
+ each carrying the publisher's words verbatim and the API URL it was cut from.
117
+ The package ships them in a data file generated from those records, so there is
118
+ no network call and no API key; `--json` carries the record page for each
119
+ provision so you can check us.
120
+
121
+ Provisions are re-checked against their source pages on a schedule, and each
122
+ one prints the day it was last read and the day it is next due.
123
+
124
+ ## Not advice
125
+
126
+ > This quotes published rules. It is not legal or compliance advice and does not
127
+ > tell you whether your system complies.
128
+
129
+ ## Licence
130
+
131
+ CC0-1.0. The quoted provisions are United States Government works in the public
132
+ domain.
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "infra-provision-check"
7
+ version = "0.1.0"
8
+ description = "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"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = { text = "CC0-1.0" }
12
+ authors = [{ name = "referencesource.org" }]
13
+ keywords = ["compliance", "terraform", "docker-compose", "hipaa", "nist",
14
+ "sp800-53", "security", "iac", "infrastructure-as-code", "audit",
15
+ "ci", "encryption", "provisions", "controls", "citation"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Legal Industry",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Security",
22
+ "Topic :: Software Development :: Quality Assurance",
23
+ "Topic :: System :: Systems Administration",
24
+ ]
25
+ dependencies = []
26
+
27
+ [project.urls]
28
+ Homepage = "https://referencesource.org/security-compliance-controls/"
29
+ Source = "https://referencesource.org/security-compliance-controls/"
30
+
31
+ [project.scripts]
32
+ infra-provision-check = "infra_provision_check.__main__:main"
33
+
34
+ [tool.setuptools.packages.find]
35
+ where = ["src"]
36
+
37
+ [tool.setuptools.package-data]
38
+ infra_provision_check = ["data.json"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+