diff --git a/.github/workflows/README.md b/.github/workflows/README.md index ba13a18e9c..a7ae1e311f 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -23,7 +23,7 @@ flowchart TB subgraph orchestrator["call-orchestrator.yml jobs"] waitfork["wait-fork-prereq-run"] --> forkready["fork-prereqs-ready"] - lintwf["call-lint.yml: make lint + hadolint"] + lintwf["call-lint.yml: make lint"] testwf["call-test.yml: make test"] codeql["cron-security-codeql.yml"] buildci["build-ci-images: call-images-build-ci.yml"] --> dns["call-test-dns.yml"] diff --git a/docs/contributing/artefact/git/branch.md b/docs/contributing/artefact/git/branch.md index 020cded368..895427d72a 100644 --- a/docs/contributing/artefact/git/branch.md +++ b/docs/contributing/artefact/git/branch.md @@ -17,7 +17,7 @@ The branch prefix MUST match the type of change. The [PR workflow](pull-request. ## Enforcement ๐Ÿ”’ -All rules in this document are actively enforced on `main` via GitHub branch protection. See [branch.md](../../tools/github/branch/security.md) for the full enforcement policy. +The [PR workflow](pull-request.md) fails its validation run when the branch prefix does not match the PR scope. The ruleset on `main` does not require that run to pass, see [branch.md](../../tools/github/branch/security.md) for the rules it enforces. The naming conventions below are additionally checked locally by the lint test [test_branch_name.py](../../../../tests/lint/repository/naming/test_branch_name.py), which fails `make test-lint` when the checked-out branch uses an unknown prefix (e.g. `feat/` instead of `feature/`) or a non-kebab-case description. diff --git a/docs/contributing/artefact/git/pipeline.md b/docs/contributing/artefact/git/pipeline.md index e0e923d34e..e69ee1385d 100644 --- a/docs/contributing/artefact/git/pipeline.md +++ b/docs/contributing/artefact/git/pipeline.md @@ -40,7 +40,7 @@ The `security-codeql` job runs the CodeQL scan (catalogued in the `Security and ### 3. Linting ๐Ÿงน -The `lint` job runs [call-lint.yml](../../../../.github/workflows/call-lint.yml): `make lint` fans every lint check out in parallel, plus a hadolint SARIF job. It MUST pass before the pipeline continues. +The `lint` job runs [call-lint.yml](../../../../.github/workflows/call-lint.yml): `make lint` fans every lint check out in parallel, hadolint on `Dockerfile` included. It MUST pass before the pipeline continues. ### 4. CI Image Build ๐Ÿณ diff --git a/docs/contributing/tools/github/actions/workflows.md b/docs/contributing/tools/github/actions/workflows.md index d40fb1c8fc..57c75220ed 100644 --- a/docs/contributing/tools/github/actions/workflows.md +++ b/docs/contributing/tools/github/actions/workflows.md @@ -44,7 +44,7 @@ Trigger column legend: **auto** = fires automatically (push, pull_request, sched |---|---|---|---| | [cron-security-codeql.yml](../../../../../.github/workflows/cron-security-codeql.yml): `๐Ÿ” Scan with CodeQL` | CodeQL static analysis. Invoked by [call-orchestrator.yml](../../../../../.github/workflows/call-orchestrator.yml) so every CI run produces a single scan; additionally runs on a weekly cron so coverage does not drop when no pushes land on `main`. See [pipeline.md](../../../artefact/git/pipeline.md) for the gating behaviour. | reusable, auto (`schedule`: weekly Mon 00:00 UTC) | none | | [cron-security-fuzz.yml](../../../../../.github/workflows/cron-security-fuzz.yml): `๐Ÿงฌ Fuzz parsers` | Runs the [atheris](https://github.com/google/atheris) harness [_yaml_bootstrap.py](../../../../../tests/fuzz/_yaml_bootstrap.py) for 15 minutes and uploads every crashing input as the `fuzz-crashes` artifact. Reproduce one locally with `pip install -e ".[fuzz]"` and `python3 tests/fuzz/_yaml_bootstrap.py `. | auto (`schedule`: weekly Sun 04:00 UTC), manual | none | -| [call-lint.yml](../../../../../.github/workflows/call-lint.yml): `๐Ÿงน Lint` | Runs `make lint` (every lint check in parallel: action, ansible, javascript, makefile, markdown, mermaid, packages, playwright, python, shellcheck) plus a hadolint SARIF job on `Dockerfile`. | reusable, manual | none | +| [call-lint.yml](../../../../../.github/workflows/call-lint.yml): `๐Ÿงน Lint` | Runs `make lint` (every lint check in parallel: action, ansible, css, dockerfile, javascript, makefile, markdown, mermaid, packages, php, playwright, python, ruby, shellcheck, sql). Hadolint checks `Dockerfile` as `lint-dockerfile` and uploads no SARIF. | reusable, manual | none | ### CI images ๐Ÿณ diff --git a/docs/contributing/tools/github/branch/security.md b/docs/contributing/tools/github/branch/security.md index 594c8331bc..c38e15dd47 100644 --- a/docs/contributing/tools/github/branch/security.md +++ b/docs/contributing/tools/github/branch/security.md @@ -4,11 +4,12 @@ See also [repository.md](../repository.md) for repository-wide security settings ## Enforcement ๐Ÿ”’ -- Ruleset is **Enabled (Enforced)** +- Ruleset `Main` is **Enabled (Enforced)** ๐Ÿ‘‰ **Meaning for contributors:** -- All rules in this document are **actively enforced** on the default branch (`main`). +- Every rule marked โœ… in this document is **actively enforced** on the default branch (`main`). +- Rules marked โŒ are not part of the ruleset and block nothing. - Contributors MUST comply; violations will block pushes/merges. --- @@ -168,45 +169,34 @@ See also [repository.md](../repository.md) for repository-wide security settings --- -## Status Checks (CI/CD) โœ… +## Status Checks (CI/CD) โŒ -### Require Status Checks to Pass โœ… +### Require Status Checks to Pass โŒ ๐Ÿ‘‰ **Contributor impact:** -- Your PR MUST pass CI before merging +- The ruleset names no required check, so a failing or missing CI run does not block the merge. +- CI in your fork still MUST be green before you open the PR, see [pull-request.md](../../../artefact/git/pull-request.md). --- -### Required Checks: NONE โš ๏ธ +### Require Branch to Be Up-To-Date โŒ ๐Ÿ‘‰ **Contributor impact:** -- Currently, no checks are enforced -- Effectively: nothing blocks merge here - ---- - -### Require Branch to Be Up-To-Date โœ… - -๐Ÿ‘‰ **Contributor impact:** - -- You MUST update your branch before merging -- Typically via: - - - merge `main` - - or rebase +- The ruleset does not block merging a branch that is behind `main`. +- Your branch still MUST be up to date with `main`, see [pull-request.md](../../../artefact/git/pull-request.md). --- ## Security ๐Ÿ” -### Require Signed Commits โœ… +### Require Signed Commits โŒ ๐Ÿ‘‰ **Contributor impact:** -- All commits MUST be signed (GPG/SSH) -- Unsigned commits will be rejected +- The ruleset `Main` does not reject unsigned commits. +- The ruleset `Signed`, which requires signed commits on `main`, is disabled. --- @@ -228,6 +218,8 @@ Configured tools: - CodeQL (High severity) - Hadolint (High severity) +No workflow uploads Hadolint results to code scanning. Hadolint checks `Dockerfile` as `lint-dockerfile` inside `make lint` and writes no SARIF. + ๐Ÿ‘‰ **Contributor impact:** - PR MUST NOT introduce high-severity issues diff --git a/docs/contributing/tools/github/repository.md b/docs/contributing/tools/github/repository.md index 9f69e43799..e202ea0f11 100644 --- a/docs/contributing/tools/github/repository.md +++ b/docs/contributing/tools/github/repository.md @@ -4,21 +4,21 @@ See also [branch.md](branch/security.md) for branch protection rules. ## Dependency Management ๐Ÿ“ฆ -### Dependency Graph โŒ +### Dependency Graph โœ… -๐Ÿ‘‰ Contributors may not have access to full dependency insights +๐Ÿ‘‰ Dependency insights are available under Insights โ†’ Dependency graph -### Dependabot Alerts โŒ +### Dependabot Alerts โœ… -๐Ÿ‘‰ Vulnerabilities may go unnoticed +๐Ÿ‘‰ Known vulnerabilities in dependencies are reported as Dependabot alerts -### Dependabot Security Updates โŒ +### Dependabot Security Updates โœ… -๐Ÿ‘‰ Contributors MUST update dependencies manually +๐Ÿ‘‰ Dependabot opens PRs that bump vulnerable dependencies to a fixed release -### Dependabot Version Updates โŒ +### Dependabot Version Updates โœ… -๐Ÿ‘‰ No automatic upgrade PRs +๐Ÿ‘‰ Dependabot opens upgrade PRs for the ecosystems listed in [dependabot.yml](../../../../.github/dependabot.yml) --- @@ -38,27 +38,25 @@ See also [branch.md](branch/security.md) for branch protection rules. For GHCR authentication configuration see [authentication.md](../ghcr/authentication.md). -### Secret Scanning โŒ +### Secret Scanning โœ… -๐Ÿ‘‰ Secrets may accidentally be committed +๐Ÿ‘‰ Committed secrets are detected and reported as secret scanning alerts -### Push Protection โŒ +### Push Protection โœ… -๐Ÿ‘‰ Commits with secrets are NOT blocked +๐Ÿ‘‰ Pushes that contain a detected secret are blocked --- ## Summary for Contributors ๐Ÿ“‹ -Once enabled, you MUST: +You MUST: - Create a PR (no direct push) - Get 2 approvals - Get CODEOWNER approval (if applicable) - Resolve all comments - Re-approve after changes -- Keep branch up-to-date -- Use signed commits - Pass code scanning & quality checks You MUST NOT: diff --git a/roles/web-app-erpnext/meta/services.yml b/roles/web-app-erpnext/meta/services.yml index 58af583995..788a4f28f4 100644 --- a/roles/web-app-erpnext/meta/services.yml +++ b/roles/web-app-erpnext/meta/services.yml @@ -65,7 +65,7 @@ erpnext: enabled: true shared: true image: frappe/erpnext - version: "v16.52.1" + version: "v16.53.0" name: erpnext min_storage: 1017MB ports: diff --git a/roles/web-app-seaweedfs/vars/main.yml b/roles/web-app-seaweedfs/vars/main.yml index 23a1089944..3ce1d0adfd 100644 --- a/roles/web-app-seaweedfs/vars/main.yml +++ b/roles/web-app-seaweedfs/vars/main.yml @@ -26,7 +26,8 @@ SEAWEEDFS_S3_REGION: "{{ lookup('config', application_id, 'services.seaweedfs.re # Exception: curl expands the credential itself via --variable, because --user "$VAR" puts it on curl's argv, visible in the host's ps. SEAWEEDFS_S3_ADMIN_CURL: >- container exec -i -e SEAWEEDFS_ADMIN_CREDENTIALS {{ SEAWEEDFS_CONTAINER_ADDRESS }} - sh -c 'exec {{ lookup('timeout', 30) | curl(retries=0) }} -S --aws-sigv4 "aws:amz:{{ SEAWEEDFS_S3_REGION }}:s3" --variable %SEAWEEDFS_ADMIN_CREDENTIALS --expand-user "{{ '{{' }}SEAWEEDFS_ADMIN_CREDENTIALS{{ '}}' }}" "$@"' curl + sh -c 'exec {{ lookup('timeout', 30) | curl(retries=0) }} -S --aws-sigv4 "aws:amz:{{ SEAWEEDFS_S3_REGION }}:s3" --variable %SEAWEEDFS_ADMIN_CREDENTIALS --expand-user + "{{ '{{' }}SEAWEEDFS_ADMIN_CREDENTIALS{{ '}}' }}" "$@"' curl SEAWEEDFS_S3_CONFIG_PATH: "{{ [ lookup('container', application_id, 'directories.volumes'), 's3.json' ] | path_join }}" diff --git a/tests/unit/python/roles/web-app-stalwart/test_store_guard.py b/tests/unit/python/roles/web-app-stalwart/test_store_guard.py index b52a7fe542..8dc5788e45 100644 --- a/tests/unit/python/roles/web-app-stalwart/test_store_guard.py +++ b/tests/unit/python/roles/web-app-stalwart/test_store_guard.py @@ -30,7 +30,9 @@ ENGINE_DOWN = "Ensure the dedicated store database runs" PRE_1_0 = "Ensure Stalwart opens no store from before 1.0" SKIPPED = {"skipped": True, "changed": False} -NO_MARKER = {"stalwart_store_marker_file": {"changed": False, "stat": {"exists": False}}} +NO_MARKER = { + "stalwart_store_marker_file": {"changed": False, "stat": {"exists": False}} +} def _render(template: str, **variables): @@ -47,7 +49,9 @@ def _module(task: dict, name: str) -> dict | None: def _layout_version() -> str: - return load_yaml_any(str(VARS), default_if_missing={})["STALWART_STORE_LAYOUT_VERSION"] + return load_yaml_any(str(VARS), default_if_missing={})[ + "STALWART_STORE_LAYOUT_VERSION" + ] def _written_marker() -> str: @@ -55,7 +59,8 @@ def _written_marker() -> str: copy = next( t["stack_host_copy"] for t in tasks - if t.get("stack_host_copy", {}).get("dest") == "{{ STALWART_STORE_MARKER_FILE }}" + if t.get("stack_host_copy", {}).get("dest") + == "{{ STALWART_STORE_MARKER_FILE }}" ) return _render(copy["content"], STALWART_STORE_LAYOUT_VERSION=_layout_version()) @@ -77,7 +82,9 @@ def _guard(results: dict[str, dict], *, shared: bool) -> str: } for task in load_yaml_any(str(GUARD), default_if_missing=[]): when = task.get("when", []) - if not all(_holds(c, facts) for c in (when if isinstance(when, list) else [when])): + if not all( + _holds(c, facts) for c in (when if isinstance(when, list) else [when]) + ): if "register" in task: facts[task["register"]] = SKIPPED continue