mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 15:01:32 +00:00
3275f9f1e0
CI run on the ecb8896 push surfaced two real failures rooted in the
2026-05-04 docs overhaul:
1. G-3 env-docs-drift caught two phantom CERTCTL_* env vars I'd
introduced in the Phase 4 follow-on connector pages
(CERTCTL_CA_CERT_PATH_NEW in adcs.md was a placeholder I made
up; CERTCTL_EJBCA_POLL_MAX_WAIT_SECONDS in ejbca.md does not
exist in source). Both removed.
2. QA-doc Part-count drift guard tried to grep
docs/qa-test-guide.md and docs/testing-guide.md, both of which
were renamed/deleted in Phase 2/Phase 5. The Part-count drift
class died with testing-guide.md (Phase 5 prune dispersed its
content); the seed-count drift class is still live but pointed
at the wrong path.
Fixes:
- Removed the QA-doc Part-count drift guard from ci.yml (premise
dead) plus its standalone scripts/qa-doc-part-count.sh peer.
- Retargeted the QA-doc seed-count drift guard from
docs/qa-test-guide.md → docs/contributor/qa-test-suite.md (the
Phase 2 target). Updated both ci.yml inline copy and
scripts/qa-doc-seed-count.sh.
- Updated Makefile qa-stats: target to drop the testing-guide.md
Parts metric (file is gone).
- Updated Makefile verify-docs: target to drop the part-count step.
G-3 was also failing in the second direction (env vars defined in
config.go but never documented anywhere). 16 vars surfaced —
features.md (deleted Phase 6) and testing-guide.md (deleted Phase 5)
had been their canonical home. Created
docs/reference/configuration.md as the new home: a compact
operator-facing env-var reference covering scheduler intervals, job
lifecycle, rate limiting, audit, deploy verify, database,
agent-side, and SCEP profile binding. Added to docs/README.md
Reference table.
Doc-side updates to qa-test-suite.md to reframe its references to
the deleted testing-guide.md (it's now self-contained: the
Part-by-Part Coverage Map IS the canonical Part inventory).
Cosmetic comment-only updates in ci.yml + scripts/ci-guards/*.sh +
scripts/dev-setup.sh to point at the new audience-organized doc
paths (docs/operator/security.md, docs/operator/tls.md,
docs/reference/architecture.md, etc.) instead of the pre-Phase-2
flat layout.
Verified: all 24 ci-guards/*.sh pass locally; qa-doc-seed-count.sh
clean. Net diff: 178 additions / 112 deletions across 13 files.
One file deleted (qa-doc-part-count.sh) and one file added
(docs/reference/configuration.md).
52 lines
2.2 KiB
Bash
52 lines
2.2 KiB
Bash
#!/usr/bin/env bash
|
|
# scripts/ci-guards/U-2-plaintext-healthcheck.sh
|
|
#
|
|
# U-2 closed cat-u-healthcheck_protocol_mismatch by switching the
|
|
# published image's HEALTHCHECK from `curl -f http://localhost:
|
|
# 8443/health` (always failed against the HTTPS-only listener) to
|
|
# `curl -fsk https://localhost:8443/health`. This script grep-fails
|
|
# the build if any Dockerfile in the repo carries the pre-U-2
|
|
# plaintext shape — either explicitly (`http://localhost:8443/
|
|
# health` in a HEALTHCHECK) or via the looser pattern of any
|
|
# HEALTHCHECK that targets `http://` against the certctl server
|
|
# port.
|
|
#
|
|
# Comment lines and the docs/archive/upgrades/to-tls-v2.2.md:182 expected-to-
|
|
# fail invariant ("plaintext is gone, expect Connection refused")
|
|
# are intentionally exempt — we DO want the upgrade-doc string
|
|
# `http://localhost:8443/health` to remain there, since it
|
|
# documents what operators should test for to confirm plaintext
|
|
# is dead. The guardrail is scoped to Dockerfile* only, so docs
|
|
# are out of its reach.
|
|
#
|
|
# See coverage-gap-audit-2026-04-24-v5/unified-audit.md
|
|
# cat-u-healthcheck_protocol_mismatch for the closure rationale,
|
|
# or deploy/test/healthcheck_test.go for the binary-image
|
|
# contract the runtime test pins.
|
|
|
|
set -e
|
|
|
|
# Patterns that catch the actual regression shapes:
|
|
# - HEALTHCHECK directive carrying any http:// (even if the
|
|
# port differs, no plaintext probe should ship).
|
|
# - The exact pre-U-2 string for grep-friendliness.
|
|
BAD=$(grep -rnEH \
|
|
-e 'HEALTHCHECK.*http://' \
|
|
-e 'curl[^|&;]*-f[^|&;]*http://localhost:8443/health' \
|
|
Dockerfile Dockerfile.agent Dockerfile.* 2>/dev/null \
|
|
| grep -vE '^\s*[^:]+:[0-9]+:\s*#' \
|
|
|| true)
|
|
if [ -n "$BAD" ]; then
|
|
echo "::error::U-2 regression: plaintext HEALTHCHECK reappeared in a Dockerfile:"
|
|
echo "$BAD"
|
|
echo ""
|
|
echo "Allowed: HTTPS HEALTHCHECK with -k (acceptable for"
|
|
echo "localhost-to-localhost), or non-HTTP probe shapes"
|
|
echo "(pgrep, /proc check). See Dockerfile / Dockerfile.agent"
|
|
echo "for the post-U-2 reference shape and"
|
|
echo "coverage-gap-audit-2026-04-24-v5/unified-audit.md"
|
|
echo "cat-u-healthcheck_protocol_mismatch for rationale."
|
|
exit 1
|
|
fi
|
|
echo "U-2 plaintext-healthcheck: clean."
|