Skip to content

chore(scaffold): community health files, phpstan static analysis, advanced app smoke - #20

Merged
rennf93 merged 2 commits into
masterfrom
ci/scaffold-baseline
Sep 30, 2026
Merged

rennf93 merged 2 commits into
masterfrom
ci/scaffold-baseline

Conversation

@rennf93

@rennf93 rennf93 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Delivers issue: none (repo chore, carries the no-issue label)

Description

Process scaffold roll-out to the PHP family, modeled on the Go family and the fastapi-guard baseline. Additive only: no existing workflow trigger is touched, no composer requirement or version change, composer.lock untouched.

Added

  • SECURITY.md: supported versions 1.2.x / 1.1.x, reporting via GitHub security advisories.
  • CONTRIBUTING.md: php ^8.2, composer install, composer test / composer lint, PR rules (issue or no-issue label, lowercase conventional commits, no attribution trailers).
  • CODE_OF_CONDUCT.md: verbatim from fastapi-guard.
  • .github/FUNDING.yml: github: rennf93, paypal custom link, tidelift commented out.
  • .github/PULL_REQUEST_TEMPLATE.md: verbatim from fastapi-guard.
  • .github/ISSUE_TEMPLATE/{bug,feature,docs,config}.yml: adapted (product name, docs URL https://rennf93.github.io/slim-guard/, php config render).
  • .github/workflows/static-analysis.yml: phpstan via the docker pattern these repos already use (composer:2 install with the same ci-only path-repository patch as ci.yml, then ghcr.io/phpstan/phpstan:latest analyse src --level=5), on push/pr to master plus weekly cron 0 5 * * 1. Level 5 is the highest level with zero findings on master (level 6 reports one).
  • .github/workflows/live-smoke.yml: appended a live-smoke-advanced job (existing simple_app job untouched), dockerized run of examples/advanced_app (host port 8081). Minimal assertions, only routes that exist in the app: GET / and GET /health 200, plus one blocked-request assertion: GET /admin/check?ip=203.0.113.9 without X-Admin-Token returns the admin gate's 400 "Missing required header: X-Admin-Token".

Skipped

  • CodeQL (code-ql.yml): drafted as directed, but the first run proved it cannot pass. GitHub CodeQL no longer supports PHP: github/codeql-action/init@2892aa5 (v4.38.2, the Go family pin) fails in Initialize CodeQL with Did not recognize the following languages: php. The file was dropped from this PR to keep CI green. Added instead: .github/workflows/semgrep.yml (the PHP-capable substitute), running the pinned semgrep/semgrep:1.177.0 container with the p/security-audit and p/secrets rulesets over src/ (--error), path-filtered push/PR triggers plus a weekly Monday cron; SEMGREP_SEND_METRICS off.
  • CHANGELOG.md: already exists.

Verification

  • every touched workflow yaml-validated (pyyaml).

  • phpstan level ceiling probed locally with the same image on master sources: level 6 reports one finding (generic return type), level 5 is the highest level with zero findings.

  • the advanced_app compose stack was built and the exact job assertions executed locally against the app: all green.

@github-actions github-actions Bot added the ci GitHub Actions workflows label Sep 28, 2026
@rennf93 rennf93 added the no-issue Chore or dependency PR that does not need an issue label Sep 28, 2026
… and advanced app smoke

- security policy, contributing guide, code of conduct, funding,
  pull request template, and issue template set (fastapi-guard baseline)
- static analysis workflow: phpstan via docker (ghcr.io/phpstan/phpstan)
  on push/pr to master plus weekly cron, level 5, zero findings
- live smoke: dockerized advanced_app job (port 8081), assertions:
  / and /health 200 plus the /admin x-admin-token gate 400 block
@rennf93
rennf93 force-pushed the ci/scaffold-baseline branch from 422ed60 to abfe07a Compare September 28, 2026 21:40
@rennf93 rennf93 changed the title chore(scaffold): community health files, codeql, phpstan static analysis, advanced app smoke chore(scaffold): community health files, phpstan static analysis, advanced app smoke Sep 28, 2026
@rennf93
rennf93 merged commit a8cffff into master Sep 30, 2026
17 checks passed
@rennf93
rennf93 deleted the ci/scaffold-baseline branch October 9, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci GitHub Actions workflows no-issue Chore or dependency PR that does not need an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant