Skip to content

Commit c910812

Browse files
Release v1.2
## Added - **DocEngine CLI** (`c5dec docengine report|presentation -n <name> [-d <dest>]`): `create_docengine_template()` in the SSDLC module copies and customizes report/presentation templates with variable substitution, overwrite protection, Quarto dependency check, and `REPORT_TEMPLATE_PATH` / `PRESENTATION_TEMPLATE_PATH` constants in `c5settings.py` - **DocEngine enhancements**: `c5dec_config_v2.yml` and `custom_vars_v2.py` pre-render script with automatic LaTeX conversion, support for string/list/dict changelog entry formats, and LaTeX escaping for special characters; Quarto presentation template (`c5dec/assets/presentation/`) with Reveal.js and PowerPoint output, ALab branding, and modular slide organization - **`docEngine.Dockerfile`**: dedicated DocEngine dev container (Quarto, TeX Live, Kryptor, Cryptomator CLI); separate `.devcontainer/c5dec-dev/` for the lightweight C5-DEC dev container - **CRA compliance module** (`c5dec/core/cra.py`, EU Regulation 2024/2847 Tier 1): YAML requirements database (35+ Annex I items), Doorstop-integrated checklist with pass/fail/na verdicts and Excel export, CRA Technical Documentation template (Annex VII, seven chapters), EU Declaration of Conformity generator (Annex V); `cra` CLI command (`create`, `verify`, `export`); feature flags and `c5settings.py` constants; test suite `tests/cra_checklist_test.py` (16 methods); user manual `docs/manual/cra.md` - **SBOM lifecycle management module** (`c5dec/core/sbom.py`): Syft-based generation (CycloneDX/SPDX), parsing, validation, version diff, Doorstop traceability, and `auto_verify_sbom_requirement()` for CRA `cra_ii_1_1`; `sbom` CLI command (`generate`, `import`, `diff`, `validate`); test suite `tests/sbom_test.py` (25+ methods); user manual `docs/manual/sbom.md` - **Native Python cryptography module** (`c5dec/core/cryptography.py`): SHA-256 file integrity, GnuPG signing/encryption, Shamir's Secret Sharing over GF(2^127−1), NaCl Ed25519 digital signatures; `c5dec crypto` CLI command with 11 subcommands (`hash`, `verify-hash`, `sign`, `verify-sig`, `encrypt`, `decrypt`, `shamir-split`, `shamir-recover`, `nacl-keygen`, `nacl-sign`, `nacl-verify`) - **CPSSA as a multi-subsystem package** (`c5dec/core/cpssa/`): `create_threat_model()` generating Threagile-compatible YAML from Doorstop SRS/ARC artefacts with auto-discovery of architecture folders; `generate_cpssa_report()` for STRIDE-based Markdown reports; Threagile field-mapping subsystem (`threagile-mappings.yml`, `threagile-schema.json`); sidecar YAML support (`threat-actors.yml`, `assumptions.yml`); `generate_fair_input_template()` and `run_quantitative_risk_analysis()` with `--fair-params` YAML override and PERT distribution support; water-treatment worked example (`c5dec/core/cpssa/examples/water-treatment/`) - **SpecEngine tools**: `c5graph.py` — interactive Cytoscape.js traceability graph producing a self-contained `specs-graph.html` (dagre layout, expand/collapse, color-coded coverage, offline asset inlining); `prune_bad_links.py` — removes Doorstop links with mismatched target prefix or links on root documents; `doorstop_yml_to_md.py` — migration script converting Doorstop items from pure YAML to Markdown with YAML frontmatter; `c5mermaid.py` — Mermaid diagram pre-processor that scans Doorstop `.md` item files for fenced ` ```mermaid ``` ` blocks, renders each to SVG (or PNG) via the Mermaid CLI (`mmdc`), stores the result in the item's `assets/` directory, and replaces the fenced block with an HTML comment preserving the original source plus a Markdown image reference; transformation is one-way and idempotent (content-hash-based filenames, `c5-mermaid-source` sentinel); supports `render` (default) and `undo` actions, `--dry-run`, and `--format svg|png`; integrated into `publish.sh` (render before publish, undo after); all support `--dry-run`; "Traceability Graph" entry added to `index.html` via `c5publish.py`; automatic item ID linkification in published HTML (`linkify_html_file()` / `_linkify_item_ids()`); per-column filter inputs in `c5browser.py`; section titles in `c5traceability.py` nav bar; `docs/specs/SpecEngine/README.md` and `c5traceability_config_example.yaml` added - **Specs**: 19 new SRS items; 5 new TCS test cases; grouping items added to `swd/`, `mrs/`, and `arc/`; headings added to all TRP items; SWD-002 updated with full C5-DEC CAD class diagram in Mermaid; SWD-003 updated with Mermaid architecture overview diagram - **Documentation**: user manuals `docs/manual/isms.md`, `docs/manual/README.md`; updated `cpssa.md`, `cryptography.md`, `ssdlc.md` - **Project template** (`c5dec/assets/templates/project/`) synchronized with current toolchain: containers, SpecEngine toolkit, DocEngine assets, refreshed `pyproject.toml` and `poetry.lock` - `SECURITY.md` detailing supported versions, responsible disclosure process, response timeline, scope definition - `CONTRIBUTING.md` explaining how to set up the development environment, submit changes, and follow project conventions - **Mermaid resize support** in `c5mermaid.py`: `--width` and `--height` flags passed to `mmdc` for SVG/PNG output dimensions - TCS and TRP Doorstop document templates added to the project template (`c5dec/assets/templates/project/docs/specs/`); test case and test report spec documents consolidated - **Common Criteria knowledge base**: completed CC KB (new CC pages) and revisions covering CC:2022 ## Fixed - TeX rendering issue in DocEngine templates and `cli new` command (malformed `\usepackage` argument in `_quarto.yml`) - Broken Doorstop link format in 14 SWD items (`ARC003`/`ARC004` → `ARC-003`/`ARC-004`) - Orphaned TCS-001–TCS-007 with empty `links: []`; all now carry SRS traceability links - 14 SRS items with placeholder (TBD) text replaced with complete procedural descriptions - Missing MRS upward traceability links in ARC-003 (MRS-013, MRS-024, MRS-025, MRS-046, MRS-047) and ARC-004 (MRS-040, MRS-041, MRS-044, MRS-060) - HTML output path in `c5traceability.py` and `c5browser.py` resolved relative to script dir instead of specs dir; corrected to `SCRIPT_DIR.parent / "docs" / "publish"` - Typos in SRS items ## Modified - `dev.Dockerfile` and `docEngine.Dockerfile` extended with Node.js 20.x, Chromium, and Mermaid CLI (`mmdc`) for Mermaid diagram rendering in the SpecEngine pipeline - `dev.Dockerfile` stripped of DocEngine dependencies (Quarto, TeX Live, fonts, cryptographic tools); `.devcontainer/devcontainer.json` updated to use `docEngine.Dockerfile` - `c5dec crypto` CLI upgraded from stub to full implementation dispatching to the native cryptography module - `c5dec cpssa` CLI extended with `fair-input` and `risk-analysis` subcommands - `c5traceability.py`: generalized to YAML-configurable, project-agnostic Doorstop traceability analyser; added `--config`, `--discover`, `--discover-write` flags and auto-discovery of document hierarchy from `.doorstop.yml` files - `c5browser.py`: extended to support both `.md` (Markdown frontmatter) and `.yml` (pure YAML) Doorstop item formats; document type list auto-discovered at runtime; numeric field detection for proper column sorting - All 246 Doorstop item files in `arc`, `mrs`, `srs`, `swd`, `tra`, `trb`, `tst` converted from pure YAML to Markdown with YAML frontmatter; `.doorstop.yml` configs updated to `itemformat: markdown` - ARC item files renamed to hyphenated format (`ARC001.yml` → `ARC-001.yml`); SWD items likewise (`SWD001.yml`–`SWD014.yml` → `SWD-001.yml`–`SWD-014.yml`) - PlantUML schematics relocated to `docs/specs/swd/assets/PlantUML/`; obsolete `classes.puml` and `subsystems.puml` removed - SpecEngine folder renamed from `docs/specs/c5dec-SpecEngine/` to `docs/specs/SpecEngine/`; `publish.sh` updated with linkification step, `c5graph.py` generation, and Mermaid render/undo steps - `c5publish.py` tooling-reports block moved to `<body>` top with "Traceability Graph" link added - DocEngine pre-render script updated from `custom_vars.py` to `custom_vars_v2.py`; default approval signatures set to placeholder (`"---"`) - **Docker security hardening**: non-root user, dropped Linux capabilities, `--no-install-recommends`, and package pinning applied to `Dockerfile`, `dev.Dockerfile`, and `docEngine.Dockerfile`; `.dockerignore` added to limit build context - **Unit test coverage significantly extended**: new test files for CLI (`cli_test.py`, 298 lines), ISMS (`isms_test.py`, 268 lines), SSDLC (`ssdlc_test.py`, 251 lines), Transformer (`transformer_test.py`, 176 lines), CPSSA (`cpssa_test.py`, 1175 lines), and cryptography (`cryptography_test.py`, 380 lines); existing CCT test files improved - Mermaid SVGs pre-rendered for SWD-002 and SWD-003; stored in `docs/specs/swd/assets/` - README, `docs/manual/README.md`, `docs/specs/README.md` ## Removed - DocEngine-specific dependencies from `dev.Dockerfile` (moved to `docEngine.Dockerfile`) - `c5traceability_v2.py`; merged into `c5traceability.py` - Stale Doorstop Bootstrap CSS/JS assets from `docs/assets/doorstop/`; replaced by CDN references - `docs/manual/overview.md`; content merged into `docs/manual/start.md`
1 parent ed972ed commit c910812

1,112 files changed

Lines changed: 88859 additions & 23387 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
3+
{
4+
"name": "C5-DEC CAD development",
5+
// Use 'dockerFile' if you want to build an image from a Dockerfile.
6+
// Use 'image' if you want to use an existing image from Docker Hub or a local image, e.g., the commented line for OpenSSL with oqs provider for PQC.
7+
// Use 'dockerComposeFile' and 'service' if you want to use a service from a docker-compose.yml file.
8+
"build": {
9+
// Sets the run context to one level up instead of the .devcontainer folder.
10+
"context": "../..",
11+
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
12+
"dockerfile": "../../dev.Dockerfile"
13+
},
14+
15+
// Features to add to the dev container. More info: https://containers.dev/features.
16+
// "features": {},
17+
18+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19+
// "forwardPorts": [],
20+
21+
// Uncomment the next line to run commands after the container is created.
22+
// "postCreateCommand": "cat /etc/os-release",
23+
24+
// Configure tool-specific properties.
25+
"customizations": {
26+
"vscode": {
27+
"extensions": [
28+
"ms-python.python",
29+
"streetsidesoftware.code-spell-checker",
30+
"quarto.quarto",
31+
"ms-toolsai.jupyter",
32+
"ms-toolsai.datawrangler",
33+
"ms-azuretools.vscode-docker"
34+
],
35+
"settings": {
36+
"python.testing.pytestArgs": [
37+
"."
38+
],
39+
"python.testing.unittestEnabled": false,
40+
"python.testing.pytestEnabled": true,
41+
"python.formatting.provider": "black"
42+
}
43+
}
44+
},
45+
46+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/alab/c5dec,type=bind",
47+
"workspaceFolder": "/home/alab/c5dec"
48+
49+
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
50+
// "remoteUser": "devcontainer"
51+
}

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
33
{
4-
"name": "C5-DEC CAD dev container",
4+
"name": "C5-DEC CAD DocEngine",
55
// Use 'dockerFile' if you want to build an image from a Dockerfile.
66
// Use 'image' if you want to use an existing image from Docker Hub or a local image, e.g., the commented line for OpenSSL with oqs provider for PQC.
77
// Use 'dockerComposeFile' and 'service' if you want to use a service from a docker-compose.yml file.
88
"build": {
99
// Sets the run context to one level up instead of the .devcontainer folder.
1010
"context": "..",
1111
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
12-
"dockerfile": "../dev.Dockerfile"
12+
"dockerfile": "../docEngine.Dockerfile"
1313
},
1414

1515
// Features to add to the dev container. More info: https://containers.dev/features.

.devcontainer/pqc-openssl/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
33
{
4-
"name": "C5-DEC cryptography dev container",
4+
"name": "C5-DEC Cryptography",
55
"image": "openquantumsafe/oqs-ossl3:latest",
66
// Use 'dockerFile' if you want to build an image from a Dockerfile.
77
// Use 'image' if you want to use an existing image from Docker Hub or a local image, e.g., the commented line for OpenSSL with oqs provider for PQC.

.dockerignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Version control
2+
.git/
3+
.gitignore
4+
5+
# Python cache and build artefacts
6+
__pycache__/
7+
**/__pycache__/
8+
*.pyc
9+
*.pyo
10+
*.pyd
11+
*.egg-info/
12+
dist/
13+
build/
14+
15+
# Virtual environments
16+
.venv/
17+
venv/
18+
19+
# Environment / secrets
20+
.env
21+
.env.*
22+
23+
# Test artefacts
24+
.pytest_cache/
25+
tests/content/
26+
27+
# Input data (not needed in the image)
28+
input/
29+
30+
# Node
31+
node_modules/
32+
33+
# IDE / editor
34+
.vscode/
35+
.idea/
36+
37+
# Dev-container metadata (not needed inside the image)
38+
.devcontainer/

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,11 @@ cython_debug/
171171
# WSL stuff
172172
*:Zone.Identifier
173173

174+
# Quarto/DocEngine output folders
175+
c5dec/assets/report/_output/
176+
c5dec/assets/etr/etr_template/_output/
177+
174178
/.quarto/
175-
.Rhistory
179+
.Rhistory
180+
181+
.cpssa_cache/docs/specs/docs/

AUTHORS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Developers
2+
----------
3+
4+
* Arash Atashpendar
5+
* Heinrich Fries
6+
* Itzel Vazquez Sandoval
7+
* Sven Angel
8+
9+
C5-DEC is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE version 3.

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
# 1.2 (2026-03-10)
2+
3+
## Added
4+
5+
- **DocEngine CLI** (`c5dec docengine report|presentation -n <name> [-d <dest>]`): `create_docengine_template()` in the SSDLC module copies and customizes report/presentation templates with variable substitution, overwrite protection, Quarto dependency check, and `REPORT_TEMPLATE_PATH` / `PRESENTATION_TEMPLATE_PATH` constants in `c5settings.py`
6+
- **DocEngine enhancements**: `c5dec_config_v2.yml` and `custom_vars_v2.py` pre-render script with automatic LaTeX conversion, support for string/list/dict changelog entry formats, and LaTeX escaping for special characters; Quarto presentation template (`c5dec/assets/presentation/`) with Reveal.js and PowerPoint output, ALab branding, and modular slide organization
7+
- **`docEngine.Dockerfile`**: dedicated DocEngine dev container (Quarto, TeX Live, Kryptor, Cryptomator CLI); separate `.devcontainer/c5dec-dev/` for the lightweight C5-DEC dev container
8+
- **CRA compliance module** (`c5dec/core/cra.py`, EU Regulation 2024/2847 Tier 1): YAML requirements database (35+ Annex I items), Doorstop-integrated checklist with pass/fail/na verdicts and Excel export, CRA Technical Documentation template (Annex VII, seven chapters), EU Declaration of Conformity generator (Annex V); `cra` CLI command (`create`, `verify`, `export`); feature flags and `c5settings.py` constants; test suite `tests/cra_checklist_test.py` (16 methods); user manual `docs/manual/cra.md`
9+
- **SBOM lifecycle management module** (`c5dec/core/sbom.py`): Syft-based generation (CycloneDX/SPDX), parsing, validation, version diff, Doorstop traceability, and `auto_verify_sbom_requirement()` for CRA `cra_ii_1_1`; `sbom` CLI command (`generate`, `import`, `diff`, `validate`); test suite `tests/sbom_test.py` (25+ methods); user manual `docs/manual/sbom.md`
10+
- **Native Python cryptography module** (`c5dec/core/cryptography.py`): SHA-256 file integrity, GnuPG signing/encryption, Shamir's Secret Sharing over GF(2^127−1), NaCl Ed25519 digital signatures; `c5dec crypto` CLI command with 11 subcommands (`hash`, `verify-hash`, `sign`, `verify-sig`, `encrypt`, `decrypt`, `shamir-split`, `shamir-recover`, `nacl-keygen`, `nacl-sign`, `nacl-verify`)
11+
- **CPSSA as a multi-subsystem package** (`c5dec/core/cpssa/`): `create_threat_model()` generating Threagile-compatible YAML from Doorstop SRS/ARC artefacts with auto-discovery of architecture folders; `generate_cpssa_report()` for STRIDE-based Markdown reports; Threagile field-mapping subsystem (`threagile-mappings.yml`, `threagile-schema.json`); sidecar YAML support (`threat-actors.yml`, `assumptions.yml`); `generate_fair_input_template()` and `run_quantitative_risk_analysis()` with `--fair-params` YAML override and PERT distribution support; water-treatment worked example (`c5dec/core/cpssa/examples/water-treatment/`)
12+
- **SpecEngine tools**: `c5graph.py` — interactive Cytoscape.js traceability graph producing a self-contained `specs-graph.html` (dagre layout, expand/collapse, color-coded coverage, offline asset inlining); `prune_bad_links.py` — removes Doorstop links with mismatched target prefix or links on root documents; `doorstop_yml_to_md.py` — migration script converting Doorstop items from pure YAML to Markdown with YAML frontmatter; `c5mermaid.py` — Mermaid diagram pre-processor that scans Doorstop `.md` item files for fenced ` ```mermaid ``` ` blocks, renders each to SVG (or PNG) via the Mermaid CLI (`mmdc`), stores the result in the item's `assets/` directory, and replaces the fenced block with an HTML comment preserving the original source plus a Markdown image reference; transformation is one-way and idempotent (content-hash-based filenames, `c5-mermaid-source` sentinel); supports `render` (default) and `undo` actions, `--dry-run`, and `--format svg|png`; integrated into `publish.sh` (render before publish, undo after); all support `--dry-run`; "Traceability Graph" entry added to `index.html` via `c5publish.py`; automatic item ID linkification in published HTML (`linkify_html_file()` / `_linkify_item_ids()`); per-column filter inputs in `c5browser.py`; section titles in `c5traceability.py` nav bar; `docs/specs/SpecEngine/README.md` and `c5traceability_config_example.yaml` added
13+
- **Specs**: 19 new SRS items; 5 new TCS test cases; grouping items added to `swd/`, `mrs/`, and `arc/`; headings added to all TRP items; SWD-002 updated with full C5-DEC CAD class diagram in Mermaid; SWD-003 updated with Mermaid architecture overview diagram
14+
- **Documentation**: user manuals `docs/manual/isms.md`, `docs/manual/README.md`; updated `cpssa.md`, `cryptography.md`, `ssdlc.md`
15+
- **Project template** (`c5dec/assets/templates/project/`) synchronized with current toolchain: containers, SpecEngine toolkit, DocEngine assets, refreshed `pyproject.toml` and `poetry.lock`
16+
- `SECURITY.md` detailing supported versions, responsible disclosure process, response timeline, scope definition
17+
- `CONTRIBUTING.md` explaining how to set up the development environment, submit changes, and follow project conventions
18+
- **Mermaid resize support** in `c5mermaid.py`: `--width` and `--height` flags passed to `mmdc` for SVG/PNG output dimensions
19+
- TCS and TRP Doorstop document templates added to the project template (`c5dec/assets/templates/project/docs/specs/`); test case and test report spec documents consolidated
20+
- **Common Criteria knowledge base**: completed CC KB (new CC pages) and revisions covering CC:2022
21+
22+
## Fixed
23+
24+
- TeX rendering issue in DocEngine templates and `cli new` command (malformed `\usepackage` argument in `_quarto.yml`)
25+
- Broken Doorstop link format in 14 SWD items (`ARC003`/`ARC004``ARC-003`/`ARC-004`)
26+
- Orphaned TCS-001–TCS-007 with empty `links: []`; all now carry SRS traceability links
27+
- 14 SRS items with placeholder (TBD) text replaced with complete procedural descriptions
28+
- Missing MRS upward traceability links in ARC-003 (MRS-013, MRS-024, MRS-025, MRS-046, MRS-047) and ARC-004 (MRS-040, MRS-041, MRS-044, MRS-060)
29+
- HTML output path in `c5traceability.py` and `c5browser.py` resolved relative to script dir instead of specs dir; corrected to `SCRIPT_DIR.parent / "docs" / "publish"`
30+
- Typos in SRS items
31+
32+
## Modified
33+
34+
- `dev.Dockerfile` and `docEngine.Dockerfile` extended with Node.js 20.x, Chromium, and Mermaid CLI (`mmdc`) for Mermaid diagram rendering in the SpecEngine pipeline
35+
- `dev.Dockerfile` stripped of DocEngine dependencies (Quarto, TeX Live, fonts, cryptographic tools); `.devcontainer/devcontainer.json` updated to use `docEngine.Dockerfile`
36+
- `c5dec crypto` CLI upgraded from stub to full implementation dispatching to the native cryptography module
37+
- `c5dec cpssa` CLI extended with `fair-input` and `risk-analysis` subcommands
38+
- `c5traceability.py`: generalized to YAML-configurable, project-agnostic Doorstop traceability analyser; added `--config`, `--discover`, `--discover-write` flags and auto-discovery of document hierarchy from `.doorstop.yml` files
39+
- `c5browser.py`: extended to support both `.md` (Markdown frontmatter) and `.yml` (pure YAML) Doorstop item formats; document type list auto-discovered at runtime; numeric field detection for proper column sorting
40+
- All 246 Doorstop item files in `arc`, `mrs`, `srs`, `swd`, `tra`, `trb`, `tst` converted from pure YAML to Markdown with YAML frontmatter; `.doorstop.yml` configs updated to `itemformat: markdown`
41+
- ARC item files renamed to hyphenated format (`ARC001.yml``ARC-001.yml`); SWD items likewise (`SWD001.yml``SWD014.yml``SWD-001.yml``SWD-014.yml`)
42+
- PlantUML schematics relocated to `docs/specs/swd/assets/PlantUML/`; obsolete `classes.puml` and `subsystems.puml` removed
43+
- SpecEngine folder renamed from `docs/specs/c5dec-SpecEngine/` to `docs/specs/SpecEngine/`; `publish.sh` updated with linkification step, `c5graph.py` generation, and Mermaid render/undo steps
44+
- `c5publish.py` tooling-reports block moved to `<body>` top with "Traceability Graph" link added
45+
- DocEngine pre-render script updated from `custom_vars.py` to `custom_vars_v2.py`; default approval signatures set to placeholder (`"---"`)
46+
- **Docker security hardening**: non-root user, dropped Linux capabilities, `--no-install-recommends`, and package pinning applied to `Dockerfile`, `dev.Dockerfile`, and `docEngine.Dockerfile`; `.dockerignore` added to limit build context
47+
- **Unit test coverage significantly extended**: new test files for CLI (`cli_test.py`, 298 lines), ISMS (`isms_test.py`, 268 lines), SSDLC (`ssdlc_test.py`, 251 lines), Transformer (`transformer_test.py`, 176 lines), CPSSA (`cpssa_test.py`, 1175 lines), and cryptography (`cryptography_test.py`, 380 lines); existing CCT test files improved
48+
- Mermaid SVGs pre-rendered for SWD-002 and SWD-003; stored in `docs/specs/swd/assets/`
49+
- README, `docs/manual/README.md`, `docs/specs/README.md`
50+
51+
## Removed
52+
53+
- DocEngine-specific dependencies from `dev.Dockerfile` (moved to `docEngine.Dockerfile`)
54+
- `c5traceability_v2.py`; merged into `c5traceability.py`
55+
- Stale Doorstop Bootstrap CSS/JS assets from `docs/assets/doorstop/`; replaced by CDN references
56+
- `docs/manual/overview.md`; content merged into `docs/manual/start.md`
57+
58+
159
# 1.1 (2025-05-12)
260

361
## Added

CONTRIBUTING.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Contributing to C5-DEC CAD
2+
3+
Thank you for your interest in contributing to C5-DEC CAD. This document explains how to set up the development environment, submit changes, and follow project conventions.
4+
5+
## Table of contents
6+
7+
- [Prerequisites](#prerequisites)
8+
- [Getting the code](#getting-the-code)
9+
- [Development environment](#development-environment)
10+
- [Branching and workflow](#branching-and-workflow)
11+
- [Commit message convention](#commit-message-convention)
12+
- [Running the test suite](#running-the-test-suite)
13+
- [Code conventions](#code-conventions)
14+
- [Documentation conventions](#documentation-conventions)
15+
- [Opening issues and pull requests](#opening-issues-and-pull-requests)
16+
17+
---
18+
19+
## Prerequisites
20+
21+
- [Docker Desktop](https://www.docker.com/products/docker-desktop/) or [Docker Engine](https://docs.docker.com/engine/install/)
22+
- [Visual Studio Code](https://code.visualstudio.com/) with the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension
23+
- [Git](https://git-scm.com/)
24+
- [Poetry](https://python-poetry.org/) ≥ 1.1 (inside the dev container, Poetry is pre-installed)
25+
26+
---
27+
28+
## Getting the code
29+
30+
```sh
31+
git clone https://github.com/AbstractionsLab/c5dec.git
32+
cd c5dec
33+
```
34+
35+
Open the folder in VS Code and select **Reopen in Container** to start the `C5-DEC CAD dev container`. All Python dependencies are installed automatically via Poetry.
36+
37+
---
38+
39+
## Development environment
40+
41+
Inside the dev container, activate the Poetry virtual environment:
42+
43+
```sh
44+
poetry shell
45+
```
46+
47+
You can then run any `c5dec` command directly:
48+
49+
```sh
50+
c5dec -h
51+
```
52+
53+
If you modify `pyproject.toml`, always validate it before committing:
54+
55+
```sh
56+
poetry check
57+
```
58+
59+
---
60+
61+
## Branching and workflow
62+
63+
| Branch | Purpose |
64+
|--------|---------|
65+
| `main` | Stable release branch; only merged from `develop` via pull request |
66+
| `develop` | Integration branch for ongoing work |
67+
| `feature/<short-description>` | New features or enhancements |
68+
| `fix/<short-description>` | Bug fixes |
69+
| `docs/<short-description>` | Documentation-only changes |
70+
71+
1. Branch off from `develop` (not `main`):
72+
```sh
73+
git checkout develop
74+
git pull
75+
git checkout -b feature/my-feature
76+
```
77+
2. Make changes in small, focused commits (see below).
78+
3. Push your branch and open a pull request targeting `develop`.
79+
80+
---
81+
82+
## Commit message convention
83+
84+
Use the imperative mood and keep the subject line under 72 characters:
85+
86+
```
87+
<type>: <short summary>
88+
89+
[optional body — wrap at 72 chars]
90+
```
91+
92+
| Type | When to use |
93+
|------|-------------|
94+
| `feat` | New feature or capability |
95+
| `fix` | Bug fix |
96+
| `docs` | Documentation changes only |
97+
| `refactor` | Code restructuring with no functional change |
98+
| `test` | Adding or updating tests |
99+
| `chore` | Tooling, dependencies, CI changes |
100+
101+
Example:
102+
103+
```
104+
feat: add CRA Annex I checklist Excel export
105+
106+
Adds per-category compliance percentage columns to the
107+
exported spreadsheet. Closes #42.
108+
```
109+
110+
---
111+
112+
## Running the test suite
113+
114+
Run all tests from the repository root:
115+
116+
```sh
117+
./run-test-suite.sh
118+
```
119+
120+
Or with pytest directly (inside the Poetry environment):
121+
122+
```sh
123+
pytest
124+
```
125+
126+
Test fixtures live in `tests/content/`. Mock all external services (OpenProject, Doorstop remote) in new tests.
127+
128+
---
129+
130+
## Code conventions
131+
132+
- Target Python 3.8–3.11; avoid syntax or library features not available in 3.8.
133+
- Use `common.logger(__name__)` for logging; never `print()` for operational output.
134+
- Raise `common.C5decError` for expected error conditions.
135+
- Reference paths via `c5settings` constants — never hard-code file paths.
136+
- Follow NumPy/Google docstring style for all public functions and classes.
137+
- Run `poetry check` after any `pyproject.toml` modification.
138+
139+
See `.github/instructions/python.instructions.md` for the full style guide.
140+
141+
---
142+
143+
## Documentation conventions
144+
145+
- All documentation lives under `docs/` (`docs/manual/`, `docs/specs/`). Never place docs alongside source code.
146+
- File names: lowercase with hyphens (`debug-mode.md`). Exception: `README.md`.
147+
- Section headings: sentence case only (`## Getting started`, not `## Getting Started`).
148+
- Formats: Markdown, YAML, JSON, CSV, or LaTeX only.
149+
150+
See `.github/instructions/docs.instructions.md` for the full guide.
151+
152+
---
153+
154+
## Opening issues and pull requests
155+
156+
- Search existing issues before opening a new one.
157+
- For bug reports, include: C5-DEC version, deployment model (Docker scripts or dev container), steps to reproduce, expected vs actual behaviour.
158+
- For feature requests, describe the use case and how it fits the C5-DEC methodology.
159+
- Pull requests must include a description of the change and reference any related issue numbers.
160+
- To report a security vulnerability, follow the process in [SECURITY.md](SECURITY.md) instead of opening a public issue.

0 commit comments

Comments
 (0)