Skip to content

Commit 70362b9

Browse files
committed
fix pre-commit
1 parent 6f1a323 commit 70362b9

8 files changed

Lines changed: 484 additions & 364 deletions

File tree

doc/explanation/compliance_track.rst

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
159159
- :ref:`C-001 <c-001>`, :ref:`C-002 <c-002>`
160160
- Integrity hash verification (:ref:`C-005 <c-005>`) is opt-in; manifest entries without an ``integrity`` field are fetched without hash verification by default
161161
- ⚠ Partial
162-
* -
162+
* -
163163
- SO.SecureStartupConfig
164164
- —
165165
- —
166166
- — N/A
167-
* -
167+
* -
168168
- SO.FactoryReset
169169
- —
170170
- —
@@ -174,17 +174,17 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
174174
- :ref:`C-010 <c-010>`, :ref:`C-039 <c-039>`, :ref:`C-043 <c-043>`
175175
- —
176176
- ✓ Implemented
177-
* -
177+
* -
178178
- SO.AutomaticUpdates
179179
- —
180180
- —
181181
- — N/A
182-
* -
182+
* -
183183
- SO.UserUpdateNotification
184184
- —
185185
- —
186186
- ✓ Implemented
187-
* -
187+
* -
188188
- SO.PostponeUpdates
189189
- —
190190
- —
@@ -194,7 +194,7 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
194194
- :ref:`C-006 <c-006>`, :ref:`C-036 <c-036>`
195195
- dfetch has no native authentication or authorisation layer; access control is fully delegated to the underlying VCS server and host OS. C-006 prevents interactive credential prompts, and C-036 strips credentials from persisted metadata — both are confidentiality controls, not access-control mechanisms in the authentication/authorisation sense
196196
- ⚠ Partial
197-
* -
197+
* -
198198
- SO.AccessControlReport
199199
- :ref:`C-045 <c-045>`
200200
- No persistent log of unauthorised access attempts
@@ -204,22 +204,22 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
204204
- :ref:`C-036 <c-036>`
205205
- —
206206
- ✓ Implemented
207-
* -
207+
* -
208208
- SO.DataProcessedConfidentiality
209209
- :ref:`C-005 <c-005>`, :ref:`C-034 <c-034>`
210210
- —
211211
- ✓ Implemented
212-
* -
212+
* -
213213
- SO.DataTransmittedConfidentiality
214214
- :ref:`C-045 <c-045>`
215215
- C-045 warns on plaintext-scheme URLs but does not refuse to proceed; TLS/SSH confidentiality is provided by the underlying VCS client, not enforced by dfetch itself
216216
- ⚠ Partial
217-
* -
217+
* -
218218
- SO.ComAuth
219219
- :ref:`C-045 <c-045>`
220220
- Server authentication (TLS certificate verification, SSH host-key checking) is delegated to the OS trust store and VCS client; dfetch does not independently authenticate remote endpoints and cannot enforce authenticated channels when C-045's warning is overridden by the user
221221
- ⚠ Partial
222-
* -
222+
* -
223223
- SO.SecureProvisioning
224224
- :ref:`C-005 <c-005>`
225225
- —
@@ -229,17 +229,17 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
229229
- :ref:`C-005 <c-005>`
230230
- Integrity hash opt-in only; not enforced by default for git/svn
231231
- ⚠ Partial
232-
* -
232+
* -
233233
- SO.DataProcessedIntegrity
234234
- :ref:`C-005 <c-005>`, :ref:`C-034 <c-034>`
235235
- —
236236
- ✓ Implemented
237-
* -
237+
* -
238238
- SO.DataTransmittedIntegrity
239239
- :ref:`C-005 <c-005>`
240240
- C-005 provides end-to-end hash verification for archive sources only (opt-in); git and svn sources rely solely on VCS object integrity (SHA-1/SHA-256 object model) and TLS/SSH channel integrity — no dfetch-level hash verification
241241
- ⚠ Partial
242-
* -
242+
* -
243243
- SO.IntegrityReport
244244
- :ref:`C-045 <c-045>`
245245
- No persistent integrity-violation log
@@ -254,7 +254,7 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
254254
- —
255255
- —
256256
- — N/A
257-
* -
257+
* -
258258
- SO.IncidentResilience
259259
- :ref:`C-002 <c-002>`, :ref:`C-007 <c-007>`
260260
- No timeout on VCS operations (potential resource exhaustion)
@@ -264,12 +264,12 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
264264
- :ref:`C-001 <c-001>`, :ref:`C-007 <c-007>`
265265
- Archive HTTP operations time out at 15 s (reachability) and 60 s (download) via ``archive.py``; git and svn subprocess calls have no timeout and can stall indefinitely
266266
- ⚠ Partial
267-
* -
267+
* -
268268
- SO.PreventAttackPropagation
269269
- :ref:`C-001 <c-001>`, :ref:`C-008 <c-008>`
270270
- —
271271
- ✓ Implemented
272-
* -
272+
* -
273273
- SO.MonitorExternalImpact
274274
- —
275275
- —
@@ -289,17 +289,17 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
289289
- —
290290
- No persistent structured security event log (LGM-1/2/3/4 gap). dfetch prints operational output to stderr but does not retain it, does not record which credentials were used, which files were modified, or when remote access occurred. C-036 ensures credentials are excluded from operational output but is not a logging control
291291
- ⚠ Partial
292-
* -
292+
* -
293293
- SO.MonitorSecurityRelevantActivities
294294
- :ref:`C-045 <c-045>`
295295
- —
296296
- ⚠ Partial
297-
* -
297+
* -
298298
- SO.OptionDisableDataLogging
299299
- —
300300
- —
301301
- — N/A
302-
* -
302+
* -
303303
- SO.OptionDisableDataMonitoring
304304
- —
305305
- —
@@ -309,17 +309,17 @@ The table below summarises dfetch's implementation of each prEN 40000-1-4 Securi
309309
- —
310310
- —
311311
- ✓ Implemented
312-
* -
312+
* -
313313
- SO.DataTransmittedConfidentiality
314314
- —
315315
- —
316316
- — N/A
317-
* -
317+
* -
318318
- SO.DataTransmittedIntegrity
319319
- —
320320
- —
321321
- — N/A
322-
* -
322+
* -
323323
- SO.ComAuth
324324
- —
325325
- —
@@ -438,4 +438,3 @@ Both files are regenerated with:
438438
--component security/dfetch.component-definition.json \\
439439
--version 0.15.0 \\
440440
--rst > doc/explanation/compliance_track.rst
441-

doc/explanation/control_register.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,3 @@ All controls implemented by dfetch, sorted by ID. Risk-driven controls emerge fr
222222
- Exploit mitigation inventory
223223
- Compliance-only
224224
- :doc:`compliance_track`
225-

security/compliance.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
SO_IMPLEMENTATIONS,
3131
STANDARDS,
3232
TRACK_B_CONTROLS,
33-
SOImplementation,
3433
)
34+
from security.compliance_types import SOImplementation
3535
from security.tm_controls_data import SC_CONTROLS, USAGE_CONTROLS, Control
3636

3737
CATALOG_PATH = os.path.join(
@@ -201,8 +201,8 @@ def _build_so_props(so_impl: SOImplementation) -> list[dict[str, str]]:
201201
def _build_so_description(so_impl: SOImplementation) -> str:
202202
"""Return the statement description for one SOImplementation."""
203203
parts = []
204-
if so_impl.description:
205-
parts.append(so_impl.description)
204+
if so_impl.doc.description:
205+
parts.append(so_impl.doc.description)
206206
if so_impl.gaps:
207207
parts.append("Gaps: " + "; ".join(so_impl.gaps))
208208
if so_impl.not_applicable:
@@ -214,7 +214,7 @@ def _build_evidence_links(so_impl: SOImplementation) -> list[dict[str, str]]:
214214
"""Return OSCAL links pointing to code or CI evidence for one SO."""
215215
return [
216216
{"href": href, "rel": "evidence", "text": text}
217-
for href, text in so_impl.evidence_hrefs
217+
for href, text in so_impl.doc.evidence_hrefs
218218
]
219219

220220

@@ -747,15 +747,15 @@ def _render_annex_v() -> None:
747747

748748
def _render_impl_notes() -> None:
749749
"""Print notes on 'Implemented' rows that have no control assigned."""
750-
noted = [so for so in SO_IMPLEMENTATIONS if so.note]
750+
noted = [so for so in SO_IMPLEMENTATIONS if so.doc.note]
751751
if not noted:
752752
return
753753
print('.. rubric:: Notes on "Implemented" rows\n')
754754
for so in noted:
755-
print(so.note + "\n")
755+
print(so.doc.note + "\n")
756756

757757

758-
def render_rst(track_b_only: bool = False) -> None:
758+
def render_rst() -> None:
759759
"""Print the full compliance track RST document to stdout."""
760760
print(
761761
".. This file is auto-generated by ``python -m security.compliance --rst``.\n"
@@ -922,7 +922,7 @@ def render_control_register_rst(track_b_only: bool = False) -> None:
922922
print(f"Written: {args.component}", file=sys.stderr)
923923

924924
if args.rst:
925-
render_rst(track_b_only=args.track_b_only)
925+
render_rst()
926926

927927
if args.control_register:
928928
render_control_register_rst(track_b_only=args.track_b_only)

0 commit comments

Comments
 (0)