chore: improve engineering excellence - #42
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: baa33468-0d83-443b-8f47-de96eb9c46e7
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the CS Server container stack by tightening startup input validation, improving operational safety (health checks, permissions), and expanding automated regression coverage to prevent configuration-driven failures and unsafe runtime behavior.
Changes:
- Add regression tests for
entrypoint.shvalidation and Compose rendering; wire them intojust checkand CI. - Harden runtime behavior: stricter env-var validation, safer FIFO location/permissions, and health checks for Compose/Quadlet.
- Improve supply-chain and repo hygiene: stop piping
curl | tar, bundle default maps fromdocs/, and tighten GitHub Actions permissions/conditions.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/entrypoint_test.sh | Adds regression tests for entrypoint validation and exit-status propagation. |
| tests/compose_test.sh | Adds Compose config rendering assertions (NOMASTER). |
| README.md | Updates docs for bundled maps, validation behavior, health checks, and restore guidance. |
| quadlet/scoutzknivez.container | Adds network-online dependency and container health check. |
| plugins/amxmodx/AQS.ini | Changes AQS defaults (disable “skip existing info” and SQL). |
| justfile | Adds just test and includes tests in just check; hardens FIFO RCON write path. |
| install.sh | Hardens installer defaults (umask/permissions) and updates Quadlet unit (network-online + health check). |
| entrypoint.sh | Adds env-var validation, moves FIFO into private runtime dir, improves shutdown + exit status behavior. |
| CONTRIBUTING.md | Updates contributor commands to include tests. |
| Containerfile | Avoids `curl |
| compose.yml | Adds NOMASTER env and Compose healthcheck. |
| CLAUDE.md | Updates FIFO path documentation. |
| .github/workflows/nightly.yml | Makes SARIF upload conditional on Trivy step success (with step id). |
| .github/workflows/friday-dust2.yml | Adds explicit minimal contents: read permissions. |
| .github/workflows/docker.yml | Expands path filters to include .containerignore and bundled maps. |
| .github/workflows/ci.yml | Runs the new regression tests in CI. |
| .github/copilot-instructions.md | Updates FIFO path documentation. |
| .env.example | Documents MAPCYCLE and NOMASTER env vars. |
| .containerignore | Allows bundling only map artifacts from docs/cstrike/maps/ into build context. |
Suppressed comments (1)
entrypoint.sh:151
scriptis no longer run with-q, so it will emit its start/stop banner to stdout/stderr, adding noise to container logs and potentially confusing log-based monitoring. Re-add quiet mode while keeping-eso the exit status is propagated.
printf -v HLDS_COMMAND '%q ' "${HLDS_ARGS[@]}"
script -eqfc "${HLDS_COMMAND}" /dev/null < "${FIFO}" &
SCRIPT_PID=$!
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
75
to
77
| hlds_command() { | ||
| echo "$1" > "${FIFO}" | ||
| printf '%s\n' "$1" >&3 | ||
| } |
| Sysctl=net.core.wmem_max=26214400 | ||
| DropCapability=ALL | ||
| NoNewPrivileges=true | ||
| HealthCmd=grep -qs hlds_linux /proc/[0-9]*/comm |
| stop_grace_period: 50s | ||
| restart: unless-stopped | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "grep -qs hlds_linux /proc/[0-9]*/comm || exit 1"] |
| Sysctl=net.core.wmem_max=26214400 | ||
| DropCapability=ALL | ||
| NoNewPrivileges=true | ||
| HealthCmd=grep -qs hlds_linux /proc/[0-9]*/comm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
git diff --checkpassedHardware-, platform-, or live-infrastructure-dependent checks are documented in the changed project guidance where applicable.