- Root Docker assets:
Dockerfile,Dockerfile.hardened, and locked variants (Dockerfile-*.locked) define image flavors. - Runtime orchestration:
docker-compose.ymlwiresparsedmarcwithmsgraph-token-refresh. - Configuration examples live in
.env.exampleandini/parsedmarc.ini.example. - Every repository operation (release bumps, environment changes, security fixes, etc.) must be logged in
change.logwith a justification so the file becomes the single source of operational context. - CI/security automation is in
.github/workflows/(build checks, release publish, Trivy, Snyk). - Utility scripts:
build.shbuilds and optionally pushesghcr.io/mkilijanek/parsedmarc.
docker build -f Dockerfile -t parsedmarc:dev .Build local standard image.docker build -f Dockerfile.hardened -t parsedmarc:dev-distroless .Build hardened/distroless image.docker compose up -d --buildStart local stack (token refresher + parsedmarc)../build.shBuild release-style image usingPARSEDMARC_VERSIONand OCI metadata.docker compose logs -f parsedmarc msgraph-token-refreshFollow startup and token-generation logs.
- Use 2-space indentation in YAML (
docker-compose.yml, workflow files). - Shell scripts should stay POSIX
shcompatible unless Bash is required. - Environment variables and build args use
UPPER_SNAKE_CASE(e.g.,PARSEDMARC_VERSION,BUILD_DATE). - Keep image tags and workflow metadata reproducible (commit-based
SOURCE_DATE_EPOCH).
- There is no Python unit-test suite in this repository; validation is container-centric.
- Required pre-merge checks: Docker build workflow succeeds for both
DockerfileandDockerfile.hardened. - Run a local smoke test before PRs: bring up compose stack and confirm
/tokens/.token.jsonis created andparsedmarcstarts. - Security quality gates are CI-based: Trivy + Snyk workflows on PR/push.
- Follow conventional prefixes seen in history:
fix: ...,chore: ..., and dependencyBump ...commits. - Keep commits scoped (one concern per commit) and explain impact in imperative mood.
- PRs should include: purpose, changed files/images, local validation commands run, and any secret/config changes.
- Link related issues and include logs/screenshots when behavior or security scan output changes.
- Never commit real secrets. Use
.env(from.env.example) andsecrets/msgraph_client_secret.txtlocally. - Keep
ini/parsedmarc.iniin sync with token path/tokens/.token.jsonwhen using Graph auth.
- Prefer a local Python
venvfor Python-based tooling and validation commands. - Use
sudoonly for operations that explicitly require system-level privileges; avoid it for normal repository work.