slopstopper-cli 0.26.0__tar.gz → 0.28.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/PKG-INFO +8 -3
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/README.md +5 -2
- slopstopper_cli-0.28.0/hatch_build.py +36 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/pyproject.toml +9 -1
- slopstopper_cli-0.28.0/slopstopper/__init__.py +1 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/licences.py +76 -38
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/cli.py +67 -6
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/comment.py +8 -1
- slopstopper_cli-0.28.0/slopstopper/installer.py +999 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/profiles.py +3 -4
- slopstopper_cli-0.28.0/slopstopper/suite.py +143 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/SKILL.md +62 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/references/configure.md +157 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/references/install.md +134 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/references/maintaining.md +37 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/references/map-pattern.md +62 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/references/preflight.md +57 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/references/refresh.md +174 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-install/references/verify.md +108 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-triage/SKILL.md +86 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-triage/references/broader-fixes.md +30 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-triage/references/categorise.md +65 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-triage/references/gotchas.md +102 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-triage/references/maintaining.md +21 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-triage/references/reproduce.md +51 -0
- slopstopper_cli-0.28.0/suite/.claude/skills/slopstopper-triage/references/upstream.md +106 -0
- slopstopper_cli-0.28.0/suite/.githooks/pre-push +22 -0
- slopstopper_cli-0.28.0/suite/.github/actions/ss-playwright/action.yml +131 -0
- slopstopper_cli-0.28.0/suite/.github/actions/ss-resolve-url/action.yml +191 -0
- slopstopper_cli-0.28.0/suite/.github/actions/ss-setup/action.yml +43 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-cloudflare-deployed.yml +163 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-auto-label-pr.yml +24 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-complexity-check.yml +85 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-csp-exceptions-check.yml +76 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-doc-updater.lock.yml +1601 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-doc-updater.md +252 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-docs-accuracy-check.yml +81 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-docs-size-check.yml +87 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-docs-structure-check.yml +82 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-entry-files-check.yml +66 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-openapi-check.yml +92 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-hygiene-privacy-check.yml +77 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-pr-summary.yml +88 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-accessibility-check.yml +165 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-api-health-check.yml +92 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-api-latency-check.yml +97 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-broken-links-check.yml +158 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-core-web-vitals.yml +152 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-e2e-check.yml +159 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-llms-txt-check.yml +116 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-robots-txt-check.yml +117 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-seo-check.yml +142 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-sitemap-check.yml +116 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-reliability-smoke-tests.yml +120 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-security-api-headers-check.yml +97 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-security-dast-check.yml +195 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-security-licences-check.yml +98 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-security-sast-check.yml +87 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-security-secrets-check.yml +101 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-security-vulnerability-all-check.yml +90 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-security-vulnerability-new-check.yml +48 -0
- slopstopper_cli-0.28.0/suite/.github/workflows/ss-workflow-failure-issue.yml +188 -0
- slopstopper_cli-0.28.0/suite/Taskfile.ss.yml +582 -0
- slopstopper_cli-0.28.0/suite/package.json +25 -0
- slopstopper_cli-0.28.0/suite/templates/_headers.example +33 -0
- slopstopper_cli-0.28.0/suite/templates/dependency-review-config.yml.example +53 -0
- slopstopper_cli-0.28.0/suite/templates/gitignore.block +24 -0
- slopstopper_cli-0.28.0/suite/templates/labeler.yml.example +38 -0
- slopstopper_cli-0.28.0/suite/templates/markdownlint.json.example +12 -0
- slopstopper_cli-0.28.0/suite/templates/slopstopper.yml.starter +60 -0
- slopstopper_cli-0.28.0/suite/templates/zap-rules.tsv.example +26 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_licences.py +36 -1
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_check_registration.py +5 -8
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_comment.py +11 -0
- slopstopper_cli-0.28.0/tests/test_install.py +524 -0
- slopstopper_cli-0.28.0/tests/test_install_cli.py +835 -0
- slopstopper_cli-0.28.0/tests/test_learn_page.py +77 -0
- slopstopper_cli-0.28.0/tests/test_suite.py +85 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_workflow_shape.py +80 -23
- slopstopper_cli-0.26.0/slopstopper/__init__.py +0 -1
- slopstopper_cli-0.26.0/tests/test_install.py +0 -1425
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/.gitignore +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/LICENSE +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/Taskfile.yml +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/__main__.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/badges.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/__init__.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/_contract.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/_docs.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/_http.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/_playwright.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/_report.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/_routes.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/_tools.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/accessibility.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/api_headers.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/api_health.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/api_latency.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/broken_links.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/complexity.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/csp_exceptions.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/cwv.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/dast.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/docs_accuracy.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/docs_size.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/docs_structure.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/e2e.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/entry_files.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/llms_txt.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/openapi.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/privacy.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/robots_txt.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/sast.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/secrets.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/seo.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/sitemap.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/smoke.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/checks/vulnerability_all.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/cloudflare.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/config.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/dast_gate.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/AGENTS.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/CLAUDE.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/README.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/_headers +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/history.html +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/index.html +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/llms.txt +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/og-image.svg +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/robots.txt +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/sitemap.xml +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/style.css +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/app/uptime.svg +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/docs/README.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/docs/architecture.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/docs/contributing.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/docs/runbooks/RELEASE.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/docs/security/CSP_EXCEPTIONS.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/env.example +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/gitignore +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/package.json +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/scripts/requirements.demo +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/scripts/status.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/demo/slopstopper.yml +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/lighthouserc.json +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/lighthouserc.prod.json +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/playwright.config.js +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/profiles.json +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/server.js +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/templates/entry-files/AGENTS.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/templates/entry-files/CLAUDE.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/templates/entry-files/README.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/templates/entry-files/docs/README.md +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/tests/accessibility.spec.ts +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/tests/broken-links.spec.ts +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/tests/e2e.spec.ts +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/data/tests/smoke.spec.ts +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/demo.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/discovery.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/emit.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/headers_adapters/__init__.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/headers_adapters/cloudflare_adapter.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/headers_adapters/csp.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/headers_adapters/json_adapter.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/headers_adapters/meta_adapter.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/output.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/templates.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/slopstopper/workflow_state.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/__init__.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/_fakes.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/__init__.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_accessibility.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_api_headers.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_api_health.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_api_latency.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_broken_links.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_complexity.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_contract.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_csp_exceptions.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_cwv.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_dast.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_docs_accuracy.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_docs_size.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_docs_structure.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_e2e.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_entry_files.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_llms_txt.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_openapi.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_privacy.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_redirects.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_robots_txt.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_sast.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_secrets.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_seo.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_shared_helpers.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_sitemap.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_smoke.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/checks/test_vulnerability_all.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/conftest.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/fixtures/subpath-site/index.html +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/fixtures/subpath-site/project/about/index.html +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/fixtures/subpath-site/project/index.html +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/fixtures/subpath-site/project/site.css +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/helpers.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_action_pins.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_badges.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_check_tables.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_cli.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_cloudflare.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_cloudflare_workflow.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_config.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_dast_gate.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_dast_workflow.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_demo.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_discovery.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_docs_layout.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_emit.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_entry_file_templates.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_exit_code_contract.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_headers_adapters.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_output.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_profiles.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_resolve_url_action.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_server_js.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_shot.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_site_identity.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_skills_shape.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_specs_subpath.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_templates.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_workflow_failure_issue.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_workflow_state.py +0 -0
- {slopstopper_cli-0.26.0 → slopstopper_cli-0.28.0}/tests/test_workflow_triggers.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: slopstopper-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.28.0
|
|
4
4
|
Summary: A Python CLI plus GitHub Actions workflows that run security, hygiene and reliability checks on every PR. One command to install into any repo.
|
|
5
5
|
Project-URL: Homepage, https://slopstopper.dev
|
|
6
6
|
Project-URL: Source, https://github.com/hungovercoders/slopstopper
|
|
@@ -29,6 +29,8 @@ Classifier: Topic :: System :: Software Distribution
|
|
|
29
29
|
Requires-Python: >=3.11
|
|
30
30
|
Requires-Dist: lizard>=1.17
|
|
31
31
|
Provides-Extra: test
|
|
32
|
+
Requires-Dist: build>=1; extra == 'test'
|
|
33
|
+
Requires-Dist: hatchling>=1.25; extra == 'test'
|
|
32
34
|
Requires-Dist: pytest>=7; extra == 'test'
|
|
33
35
|
Description-Content-Type: text/markdown
|
|
34
36
|
|
|
@@ -57,7 +59,7 @@ For a repo you'll keep, install the pinned suite so local and CI run the same ve
|
|
|
57
59
|
curl -fsSL https://raw.githubusercontent.com/hungovercoders/slopstopper/main/install.sh | bash
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
> Requires [mise](https://mise.jdx.dev). `install.sh` pins `slopstopper-cli` + `task` in `mise.toml` (the single source of truth both local runs and CI read) and
|
|
62
|
+
> Requires [mise](https://mise.jdx.dev). `install.sh` pins `slopstopper-cli` + `task` in `mise.toml` (the single source of truth both local runs and CI read), installs that version, and hands over to `slopstopper install`, which writes the `ss-*.yml` workflows, shims, seeds, hook and skills from the files that version ships. Move the pin with `install.sh --upgrade-cli` / `--cli-version`.
|
|
61
63
|
|
|
62
64
|
Development (editable, from a clone of this repo):
|
|
63
65
|
|
|
@@ -80,6 +82,7 @@ slopstopper doctor [--json] # verify external tools are insta
|
|
|
80
82
|
slopstopper profile {list, show, expand <n>, disabled, detect} [--json] # project-shape profile (ui / api / library)
|
|
81
83
|
slopstopper cloudflare preview-url <sha> # a commit's Workers Builds preview URL, from Cloudflare's PR comment on stdin
|
|
82
84
|
slopstopper demo [--out <dir>] [--force] [--json] # write a small demo repo that two checks fail on, to try the suite
|
|
85
|
+
slopstopper install [<dir>] [--profile <n>] [--no-task] [--no-skills] [--no-hooks] [--no-topic] [--only skills] # write the suite (or just the skills) into a repo from this CLI's own wheel
|
|
83
86
|
slopstopper --quiet … # suppress decorative output (CI logs)
|
|
84
87
|
```
|
|
85
88
|
|
|
@@ -112,7 +115,9 @@ This workflow is slopstopper-internal. It is **not** part of the distributed `ss
|
|
|
112
115
|
- `slopstopper/templates.py` resolves bundled templates and backs the `templates {list, path, eject}` API
|
|
113
116
|
- `slopstopper/emit.py` wraps the `gh` CLI to post PR comments and main-branch issues
|
|
114
117
|
- `slopstopper/discovery.py` resolves the pages to audit for reliability checks
|
|
115
|
-
- `slopstopper/profiles.py` holds the project-shape profiles. It resolves which workflows a repo carries with `(profile.disables − workflows.enabled) ∪ workflows.disabled` (explicit `workflows.disabled` wins if the same workflow is listed in both), plus the check → workflow map. `install
|
|
118
|
+
- `slopstopper/profiles.py` holds the project-shape profiles. It resolves which workflows a repo carries with `(profile.disables − workflows.enabled) ∪ workflows.disabled` (explicit `workflows.disabled` wins if the same workflow is listed in both), plus the check → workflow map. `slopstopper install` resolves the workflow set through it, so it is the only implementation
|
|
119
|
+
- `slopstopper/suite.py` names every file the suite ships (workflows, actions, shims, seeds, hook, skills); `hatch_build.py` copies them from the repository root into the sdist and the wheel under `slopstopper/data/suite/`, and an editable install reads the checkout
|
|
120
|
+
- `slopstopper/installer.py` is `slopstopper install`: it writes that suite into a repo, seeds the mise pin with its own version when there is none, and refreshes slopstopper-owned files on a re-run
|
|
116
121
|
- `slopstopper/checks/` holds one module per check; the registry is in `__init__.py`
|
|
117
122
|
- `slopstopper/data/` holds the bundled Playwright specs, lighthouserc dev/prod, server.js and `profiles.json`
|
|
118
123
|
|
|
@@ -23,7 +23,7 @@ For a repo you'll keep, install the pinned suite so local and CI run the same ve
|
|
|
23
23
|
curl -fsSL https://raw.githubusercontent.com/hungovercoders/slopstopper/main/install.sh | bash
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
> Requires [mise](https://mise.jdx.dev). `install.sh` pins `slopstopper-cli` + `task` in `mise.toml` (the single source of truth both local runs and CI read) and
|
|
26
|
+
> Requires [mise](https://mise.jdx.dev). `install.sh` pins `slopstopper-cli` + `task` in `mise.toml` (the single source of truth both local runs and CI read), installs that version, and hands over to `slopstopper install`, which writes the `ss-*.yml` workflows, shims, seeds, hook and skills from the files that version ships. Move the pin with `install.sh --upgrade-cli` / `--cli-version`.
|
|
27
27
|
|
|
28
28
|
Development (editable, from a clone of this repo):
|
|
29
29
|
|
|
@@ -46,6 +46,7 @@ slopstopper doctor [--json] # verify external tools are insta
|
|
|
46
46
|
slopstopper profile {list, show, expand <n>, disabled, detect} [--json] # project-shape profile (ui / api / library)
|
|
47
47
|
slopstopper cloudflare preview-url <sha> # a commit's Workers Builds preview URL, from Cloudflare's PR comment on stdin
|
|
48
48
|
slopstopper demo [--out <dir>] [--force] [--json] # write a small demo repo that two checks fail on, to try the suite
|
|
49
|
+
slopstopper install [<dir>] [--profile <n>] [--no-task] [--no-skills] [--no-hooks] [--no-topic] [--only skills] # write the suite (or just the skills) into a repo from this CLI's own wheel
|
|
49
50
|
slopstopper --quiet … # suppress decorative output (CI logs)
|
|
50
51
|
```
|
|
51
52
|
|
|
@@ -78,7 +79,9 @@ This workflow is slopstopper-internal. It is **not** part of the distributed `ss
|
|
|
78
79
|
- `slopstopper/templates.py` resolves bundled templates and backs the `templates {list, path, eject}` API
|
|
79
80
|
- `slopstopper/emit.py` wraps the `gh` CLI to post PR comments and main-branch issues
|
|
80
81
|
- `slopstopper/discovery.py` resolves the pages to audit for reliability checks
|
|
81
|
-
- `slopstopper/profiles.py` holds the project-shape profiles. It resolves which workflows a repo carries with `(profile.disables − workflows.enabled) ∪ workflows.disabled` (explicit `workflows.disabled` wins if the same workflow is listed in both), plus the check → workflow map. `install
|
|
82
|
+
- `slopstopper/profiles.py` holds the project-shape profiles. It resolves which workflows a repo carries with `(profile.disables − workflows.enabled) ∪ workflows.disabled` (explicit `workflows.disabled` wins if the same workflow is listed in both), plus the check → workflow map. `slopstopper install` resolves the workflow set through it, so it is the only implementation
|
|
83
|
+
- `slopstopper/suite.py` names every file the suite ships (workflows, actions, shims, seeds, hook, skills); `hatch_build.py` copies them from the repository root into the sdist and the wheel under `slopstopper/data/suite/`, and an editable install reads the checkout
|
|
84
|
+
- `slopstopper/installer.py` is `slopstopper install`: it writes that suite into a repo, seeds the mise pin with its own version when there is none, and refreshes slopstopper-owned files on a re-run
|
|
82
85
|
- `slopstopper/checks/` holds one module per check; the registry is in `__init__.py`
|
|
83
86
|
- `slopstopper/data/` holds the bundled Playwright specs, lighthouserc dev/prod, server.js and `profiles.json`
|
|
84
87
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Hatch build hook: ship the suite inside the wheel.
|
|
2
|
+
|
|
3
|
+
`slopstopper install` writes the workflows, shims, seeds, hook and skills
|
|
4
|
+
that live at the root of this repository, above `cli/`. A wheel built from
|
|
5
|
+
a checkout takes them from there; the sdist carries a copy under `suite/`
|
|
6
|
+
so a wheel built from the sdist (what `python -m build` does) finds the same
|
|
7
|
+
files. The list of what ships is `slopstopper.suite.shipped_paths`, so the
|
|
8
|
+
installer and the package can never disagree about it. An editable install
|
|
9
|
+
gets nothing copied: it reads the checkout directly.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import sys
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
18
|
+
|
|
19
|
+
PACKAGED = "slopstopper/data/suite"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class SuiteBuildHook(BuildHookInterface):
|
|
23
|
+
PLUGIN_NAME = "suite"
|
|
24
|
+
|
|
25
|
+
def initialize(self, version: str, build_data: dict) -> None:
|
|
26
|
+
if version == "editable":
|
|
27
|
+
return
|
|
28
|
+
project = Path(self.root)
|
|
29
|
+
sys.path.insert(0, str(project))
|
|
30
|
+
from slopstopper import suite
|
|
31
|
+
|
|
32
|
+
bundled = project / "suite"
|
|
33
|
+
source = bundled if (bundled / suite.TASKFILE).is_file() else project.parent
|
|
34
|
+
prefix = "suite" if self.target_name == "sdist" else PACKAGED
|
|
35
|
+
for rel in suite.shipped_paths(source):
|
|
36
|
+
build_data["force_include"][str(source / rel)] = f"{prefix}/{rel}"
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "slopstopper-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.28.0"
|
|
8
8
|
description = "A Python CLI plus GitHub Actions workflows that run security, hygiene and reliability checks on every PR. One command to install into any repo."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -52,6 +52,9 @@ dependencies = [
|
|
|
52
52
|
[project.optional-dependencies]
|
|
53
53
|
test = [
|
|
54
54
|
"pytest>=7",
|
|
55
|
+
# test_suite.py builds the wheel and the sdist to prove the suite ships.
|
|
56
|
+
"build>=1",
|
|
57
|
+
"hatchling>=1.25",
|
|
55
58
|
]
|
|
56
59
|
|
|
57
60
|
[project.scripts]
|
|
@@ -71,6 +74,11 @@ Acknowledgements = "https://github.com/hungovercoders/slopstopper/blob/main/ATTR
|
|
|
71
74
|
# caused a double-include error when building the wheel under hatchling.
|
|
72
75
|
packages = ["slopstopper"]
|
|
73
76
|
|
|
77
|
+
# hatch_build.py copies the suite (workflows, shims, seeds, hook, skills)
|
|
78
|
+
# from the repository root into the sdist and the wheel; see
|
|
79
|
+
# slopstopper/suite.py for the list.
|
|
80
|
+
[tool.hatch.build.hooks.custom]
|
|
81
|
+
|
|
74
82
|
[tool.pytest.ini_options]
|
|
75
83
|
testpaths = ["tests"]
|
|
76
84
|
addopts = "-q"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.28.0" # x-release-please-version
|
|
@@ -17,8 +17,11 @@ No tool is installed for it:
|
|
|
17
17
|
- Python: `python3 -m pip inspect` lists the packages installed in that
|
|
18
18
|
interpreter's environment with their metadata, which is where a
|
|
19
19
|
Python project's resolved tree lives. The check refuses to pass when
|
|
20
|
-
the manifest's declared dependencies
|
|
21
|
-
empty environment never reads as
|
|
20
|
+
neither the manifest's declared runtime dependencies nor the project
|
|
21
|
+
itself is installed there, so an empty environment never reads as
|
|
22
|
+
clean; a project that declares no runtime dependencies judges nothing
|
|
23
|
+
and passes. Optional extras and Poetry dependency groups do not ship,
|
|
24
|
+
so they count only when `include_dev` is on.
|
|
22
25
|
|
|
23
26
|
A licence the metadata does not state, or states in a form that is not
|
|
24
27
|
an SPDX expression, is listed as unknown and never fails the run, the
|
|
@@ -31,7 +34,7 @@ Configuration (.slopstopper.yml):
|
|
|
31
34
|
security:
|
|
32
35
|
licences:
|
|
33
36
|
policy: .github/dependency-review-config.yml # the allowlist dependency review reads
|
|
34
|
-
include_dev: false # also judge npm devDependencies
|
|
37
|
+
include_dev: false # also judge npm devDependencies, Python extras and Poetry groups
|
|
35
38
|
python: python3 # interpreter whose environment holds the Python dependencies
|
|
36
39
|
|
|
37
40
|
Exit codes:
|
|
@@ -355,20 +358,29 @@ def _python_manifests(root: Path) -> list[Path]:
|
|
|
355
358
|
return [d / m for d in _manifest_dirs(root) for m in PYTHON_MANIFESTS if (d / m).is_file()]
|
|
356
359
|
|
|
357
360
|
|
|
358
|
-
def
|
|
359
|
-
"""(dependency
|
|
360
|
-
`
|
|
361
|
+
def _poetry_specs(poetry: dict) -> tuple[list[str], list[str]]:
|
|
362
|
+
"""(dependency names, group dependency names) from Poetry's tables,
|
|
363
|
+
minus the `python` pin."""
|
|
364
|
+
runtime = [n for n in (poetry.get("dependencies") or {}) if n.lower() != "python"]
|
|
365
|
+
groups = [
|
|
366
|
+
n for group in (poetry.get("group") or {}).values()
|
|
367
|
+
for n in (group.get("dependencies") or {}) if n.lower() != "python"
|
|
368
|
+
]
|
|
369
|
+
return runtime, groups
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
def _pyproject_specs(data: dict) -> tuple[list[str], list[str], set[str]]:
|
|
373
|
+
"""(runtime dependency specs, optional specs, project names) a parsed
|
|
374
|
+
pyproject declares, from `[project]` and from Poetry's tables. The
|
|
375
|
+
optional ones are `[project.optional-dependencies]` extras and Poetry's
|
|
376
|
+
dependency groups: installed on request, not shipped (#578)."""
|
|
361
377
|
project = data.get("project") or {}
|
|
362
378
|
poetry = (data.get("tool") or {}).get("poetry") or {}
|
|
363
379
|
projects = {_normalise_name("pypi", str(n)) for n in (project.get("name"), poetry.get("name")) if n}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
for group in (poetry.get("group") or {}).values():
|
|
369
|
-
poetry_deps.update(group.get("dependencies") or {})
|
|
370
|
-
specs += [name for name in poetry_deps if name.lower() != "python"]
|
|
371
|
-
return specs, projects
|
|
380
|
+
extras = [spec for extra in (project.get("optional-dependencies") or {}).values() for spec in extra]
|
|
381
|
+
poetry_runtime, poetry_groups = _poetry_specs(poetry)
|
|
382
|
+
specs = list(project.get("dependencies", [])) + poetry_runtime
|
|
383
|
+
return specs, extras + poetry_groups, projects
|
|
372
384
|
|
|
373
385
|
|
|
374
386
|
def _requirements_specs(text: str) -> list[str]:
|
|
@@ -376,23 +388,33 @@ def _requirements_specs(text: str) -> list[str]:
|
|
|
376
388
|
return [s for s in specs if s and not s.startswith("-")]
|
|
377
389
|
|
|
378
390
|
|
|
379
|
-
def
|
|
380
|
-
|
|
391
|
+
def _names(specs: list[str]) -> set[str]:
|
|
392
|
+
names = set()
|
|
393
|
+
for spec in specs:
|
|
394
|
+
m = re.match(r"^\s*([A-Za-z0-9][A-Za-z0-9._-]*)", spec)
|
|
395
|
+
if m:
|
|
396
|
+
names.add(_normalise_name("pypi", m.group(1)))
|
|
397
|
+
return names
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def _declared(manifest: Path, include_dev: bool = False) -> tuple[set[str], set[str], set[str]]:
|
|
401
|
+
"""(dependency names, project names, optional names left out) a manifest
|
|
402
|
+
declares, normalised. With `include_dev` the optional names (extras,
|
|
403
|
+
Poetry groups) count as declared and the third set is empty."""
|
|
381
404
|
text = manifest.read_text(encoding="utf-8", errors="replace")
|
|
382
405
|
projects: set[str] = set()
|
|
406
|
+
optional: list[str] = []
|
|
383
407
|
if manifest.name == "pyproject.toml":
|
|
384
408
|
try:
|
|
385
|
-
specs, projects = _pyproject_specs(tomllib.loads(text))
|
|
409
|
+
specs, optional, projects = _pyproject_specs(tomllib.loads(text))
|
|
386
410
|
except tomllib.TOMLDecodeError:
|
|
387
|
-
return set(), projects
|
|
411
|
+
return set(), projects, set()
|
|
388
412
|
else:
|
|
389
413
|
specs = _requirements_specs(text)
|
|
390
|
-
deps =
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
deps.add(_normalise_name("pypi", m.group(1)))
|
|
395
|
-
return deps, projects
|
|
414
|
+
deps, extras = _names(specs), _names(optional)
|
|
415
|
+
if include_dev:
|
|
416
|
+
return deps | extras, projects, set()
|
|
417
|
+
return deps, projects, extras - deps
|
|
396
418
|
|
|
397
419
|
|
|
398
420
|
def _python_licence(metadata: dict) -> str | None:
|
|
@@ -442,11 +464,13 @@ def _python_interpreter(root: Path, manifests: list[Path]) -> str | None:
|
|
|
442
464
|
return shutil.which("python3")
|
|
443
465
|
|
|
444
466
|
|
|
445
|
-
def _python_packages(root: Path, manifests: list[Path]) -> list[dict] | str:
|
|
467
|
+
def _python_packages(root: Path, manifests: list[Path], include_dev: bool = False) -> list[dict] | str:
|
|
446
468
|
"""The packages installed in the configured interpreter, once the
|
|
447
|
-
manifests' declared dependencies
|
|
448
|
-
declares nothing the check can read judges
|
|
449
|
-
whatever environment happens to be on PATH
|
|
469
|
+
manifests' declared runtime dependencies, or the project itself, are
|
|
470
|
+
among them. A manifest that declares nothing the check can read judges
|
|
471
|
+
nothing, rather than whatever environment happens to be on PATH; so
|
|
472
|
+
does a project with no runtime dependencies, which is what an installed
|
|
473
|
+
stdlib-only package resolves to (#578)."""
|
|
450
474
|
python = _python_interpreter(root, manifests)
|
|
451
475
|
if not python:
|
|
452
476
|
return "no `python3` on PATH to inspect; set security.licences.python to the interpreter whose environment holds the project's dependencies"
|
|
@@ -456,13 +480,13 @@ def _python_packages(root: Path, manifests: list[Path]) -> list[dict] | str:
|
|
|
456
480
|
declared: set[str] = set()
|
|
457
481
|
projects: set[str] = set()
|
|
458
482
|
for manifest in manifests:
|
|
459
|
-
d, p = _declared(manifest)
|
|
483
|
+
d, p, _ = _declared(manifest, include_dev)
|
|
460
484
|
declared |= d
|
|
461
485
|
projects |= p
|
|
462
486
|
installed = {_normalise_name("pypi", str(m.get("name", ""))): m for m in metadata if m.get("name")}
|
|
463
487
|
if not declared:
|
|
464
488
|
return []
|
|
465
|
-
if not (declared & set(installed)):
|
|
489
|
+
if not ((declared | projects) & set(installed)):
|
|
466
490
|
return (
|
|
467
491
|
f"none of the dependencies declared in {', '.join(f'`{m.relative_to(root)}`' for m in manifests)} is installed in "
|
|
468
492
|
f"`{python}`'s environment, so there is no resolved tree to inventory; install the project there first "
|
|
@@ -540,17 +564,31 @@ def _inventory(root: Path, include_dev: bool) -> tuple[list[dict], list[str], li
|
|
|
540
564
|
skipped.append(f"`{(d / name).relative_to(root)}` carries no licence data, so that tree was not judged")
|
|
541
565
|
manifests = _python_manifests(root)
|
|
542
566
|
if manifests:
|
|
543
|
-
found =
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
skipped.append(f"{', '.join(f'`{m.relative_to(root)}`' for m in manifests)} declare no dependencies the check can read, so no Python environment was judged")
|
|
548
|
-
else:
|
|
549
|
-
packages += found
|
|
550
|
-
skipped.append(f"Python packages read from `{found[0]['source']}`")
|
|
567
|
+
found, notes, failed = _python_inventory(root, manifests, include_dev)
|
|
568
|
+
packages += found
|
|
569
|
+
skipped += notes
|
|
570
|
+
failures += failed
|
|
551
571
|
return packages, skipped, failures
|
|
552
572
|
|
|
553
573
|
|
|
574
|
+
def _python_inventory(root: Path, manifests: list[Path], include_dev: bool) -> tuple[list[dict], list[str], list[str]]:
|
|
575
|
+
"""The Python part of `_inventory`: (packages, notes, failures)."""
|
|
576
|
+
names = ", ".join(f"`{m.relative_to(root)}`" for m in manifests)
|
|
577
|
+
notes: list[str] = []
|
|
578
|
+
found = _python_packages(root, manifests, include_dev)
|
|
579
|
+
if isinstance(found, str):
|
|
580
|
+
return [], notes, [found]
|
|
581
|
+
if found:
|
|
582
|
+
notes.append(f"Python packages read from `{found[0]['source']}`")
|
|
583
|
+
else:
|
|
584
|
+
notes.append(f"{names} declare no runtime dependencies the check can read, so no Python environment was judged")
|
|
585
|
+
for manifest in manifests:
|
|
586
|
+
_, _, optional = _declared(manifest, include_dev)
|
|
587
|
+
if optional:
|
|
588
|
+
notes.append(f"`{manifest.relative_to(root)}`: {len(optional)} optional (extras / Poetry group) dependencies not judged (they do not ship; `security.licences.include_dev: true` judges them too)")
|
|
589
|
+
return found, notes, []
|
|
590
|
+
|
|
591
|
+
|
|
554
592
|
def _cannot_run(reasons: list[str]) -> int:
|
|
555
593
|
"""Say why on stdout, record it in the report, exit 2."""
|
|
556
594
|
for reason in reasons:
|
|
@@ -87,6 +87,7 @@ from slopstopper import (
|
|
|
87
87
|
demo as demo_mod,
|
|
88
88
|
discovery,
|
|
89
89
|
emit as emit_mod,
|
|
90
|
+
installer,
|
|
90
91
|
output,
|
|
91
92
|
profiles,
|
|
92
93
|
templates,
|
|
@@ -119,6 +120,7 @@ Commands:
|
|
|
119
120
|
doctor Verify install + required tools
|
|
120
121
|
profile Inspect the repo's project-shape profile (ui / api / library)
|
|
121
122
|
demo Write a small demo repo that some checks fail on, to try the suite
|
|
123
|
+
install Write the suite into a repo: workflows, shims, seeds, hook, skills
|
|
122
124
|
|
|
123
125
|
Quick start:
|
|
124
126
|
slopstopper checks list # see what's available
|
|
@@ -179,6 +181,7 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
179
181
|
_add_profile(sub)
|
|
180
182
|
_add_cloudflare(sub)
|
|
181
183
|
_add_demo(sub)
|
|
184
|
+
_add_install(sub)
|
|
182
185
|
|
|
183
186
|
return parser
|
|
184
187
|
|
|
@@ -254,13 +257,15 @@ def _add_emit(sub) -> None:
|
|
|
254
257
|
)
|
|
255
258
|
p.add_argument(
|
|
256
259
|
"--status",
|
|
257
|
-
choices=["pass", "fail", "warn"],
|
|
260
|
+
choices=["pass", "fail", "warn", "error"],
|
|
258
261
|
default="fail",
|
|
259
262
|
help=(
|
|
260
263
|
"The check's own outcome, as the workflow saw it (default: fail). "
|
|
261
|
-
"'warn' is for the advisory checks that report findings while exiting 0
|
|
264
|
+
"'warn' is for the advisory checks that report findings while exiting 0; "
|
|
265
|
+
"'error' is exit 2, the check could not run, so the comment names the cause "
|
|
266
|
+
"rather than claiming a finding. "
|
|
262
267
|
"Drives the comment's verdict line instead of parsing the report. "
|
|
263
|
-
"Pass `--status ${{ steps.<id>.
|
|
268
|
+
"Pass `--status ${{ steps.<id>.outputs.rc == '0' && 'pass' || steps.<id>.outputs.rc == '1' && 'fail' || 'error' }}`"
|
|
264
269
|
),
|
|
265
270
|
)
|
|
266
271
|
p.add_argument(
|
|
@@ -587,7 +592,7 @@ def _add_profile(sub) -> None:
|
|
|
587
592
|
description=(
|
|
588
593
|
"Print this repo's effective disabled set, one filename per line: the\n"
|
|
589
594
|
"profile's workflows (and its no-API holdbacks) minus workflows.enabled,\n"
|
|
590
|
-
"plus workflows.disabled. The set
|
|
595
|
+
"plus workflows.disabled. The set the installer leaves out; workflows read it\n"
|
|
591
596
|
"to skip checks the repo has turned off.\n"
|
|
592
597
|
),
|
|
593
598
|
epilog="Example:\n slopstopper profile disabled\n",
|
|
@@ -652,6 +657,10 @@ _DISPATCHERS = {
|
|
|
652
657
|
"doctor": lambda a: _dispatch_doctor(as_json=a.json),
|
|
653
658
|
"profile": lambda a: _dispatch_profile(a.profile_action, getattr(a, "name", None), as_json=a.json),
|
|
654
659
|
"cloudflare": lambda a: _dispatch_cloudflare(a.cloudflare_action, a.sha),
|
|
660
|
+
"install": lambda a: installer.install(installer.Options(
|
|
661
|
+
target=Path(a.target), profile=a.profile, use_task=not a.no_task,
|
|
662
|
+
skills=not a.no_skills, hooks=not a.no_hooks, topic=not a.no_topic, only=a.only,
|
|
663
|
+
)),
|
|
655
664
|
"demo": lambda a: _dispatch_demo(a.out, force=a.force, as_json=a.json),
|
|
656
665
|
}
|
|
657
666
|
|
|
@@ -690,6 +699,58 @@ def _add_demo(sub) -> None:
|
|
|
690
699
|
)
|
|
691
700
|
|
|
692
701
|
|
|
702
|
+
def _add_install(sub) -> None:
|
|
703
|
+
p = sub.add_parser(
|
|
704
|
+
"install",
|
|
705
|
+
help="Install or refresh the suite in a repo: workflows, shims, seeds, hook, skills",
|
|
706
|
+
description=(
|
|
707
|
+
"Write the SlopStopper suite into TARGET (default: the current directory):\n"
|
|
708
|
+
"the ss-*.yml workflows and the composite actions they build on, the\n"
|
|
709
|
+
"task ss:* shims, a starter .slopstopper.yml, the seeds a green first PR\n"
|
|
710
|
+
"needs (labeler, licence policy, headers baseline, ZAP rules, markdownlint\n"
|
|
711
|
+
"config, entry-file scaffolds), the pre-push hygiene hook and the two\n"
|
|
712
|
+
"Claude Code skills. Every file comes from this CLI's own wheel, so the\n"
|
|
713
|
+
"shims and the CLI agree; the pin in mise.toml is seeded with this version\n"
|
|
714
|
+
"when the repo has none and never moved by a re-run (install.sh\n"
|
|
715
|
+
"--upgrade-cli / --cli-version move it).\n\n"
|
|
716
|
+
"A re-run refreshes slopstopper-owned files and leaves adopter-owned ones\n"
|
|
717
|
+
"(.slopstopper.yml, package.json, the seeds) alone. A workflow you deleted\n"
|
|
718
|
+
"stays deleted: .ss/.workflows-installed lists every workflow the installer\n"
|
|
719
|
+
"has placed, so remove its line there to have it back. A profile drops\n"
|
|
720
|
+
"whole sets.\n\n"
|
|
721
|
+
"Profiles (--profile) tailor the suite to the repo's shape:\n"
|
|
722
|
+
" ui a site or app that serves HTML. Every check applies (default);\n"
|
|
723
|
+
" the four API checks once the repo shows an API.\n"
|
|
724
|
+
" api JSON/gRPC endpoints with no browser surface. Drops the nine\n"
|
|
725
|
+
" browser-and-SEO reliability checks.\n"
|
|
726
|
+
" library a library, CLI or package with no deployed surface. Also drops\n"
|
|
727
|
+
" DAST, CSP exceptions and the four API checks.\n"
|
|
728
|
+
"The flag writes `profile:` into .slopstopper.yml; omitting it leaves an\n"
|
|
729
|
+
"existing key untouched. `slopstopper profile list` has the full mapping.\n"
|
|
730
|
+
),
|
|
731
|
+
epilog=(
|
|
732
|
+
"Env var equivalents: SLOPSTOPPER_PROFILE, SLOPSTOPPER_NO_TASK,\n"
|
|
733
|
+
"SLOPSTOPPER_NO_SKILLS, SLOPSTOPPER_NO_HOOKS, SLOPSTOPPER_NO_TOPIC.\n\n"
|
|
734
|
+
"Examples:\n"
|
|
735
|
+
" slopstopper install\n"
|
|
736
|
+
" slopstopper install --profile api\n"
|
|
737
|
+
" slopstopper install --no-task ../other-repo\n"
|
|
738
|
+
" slopstopper install --only skills # refresh the Claude Code skills, nothing else\n"
|
|
739
|
+
),
|
|
740
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
741
|
+
)
|
|
742
|
+
p.add_argument("target", nargs="?", default=".", metavar="TARGET", help="the repo to install into (default: .)")
|
|
743
|
+
p.add_argument(
|
|
744
|
+
"--profile", default=os.environ.get("SLOPSTOPPER_PROFILE") or None, metavar="NAME",
|
|
745
|
+
help=f"write this profile into .slopstopper.yml and install its check set ({' | '.join(profiles.names())})",
|
|
746
|
+
)
|
|
747
|
+
p.add_argument("--no-task", action="store_true", default=bool(os.environ.get("SLOPSTOPPER_NO_TASK")), help="workflows call slopstopper-cli directly instead of task ss:*")
|
|
748
|
+
p.add_argument("--no-skills", action="store_true", default=bool(os.environ.get("SLOPSTOPPER_NO_SKILLS")), help="skip the Claude Code skills")
|
|
749
|
+
p.add_argument("--no-hooks", action="store_true", default=bool(os.environ.get("SLOPSTOPPER_NO_HOOKS")), help="skip the pre-push hygiene hook")
|
|
750
|
+
p.add_argument("--no-topic", action="store_true", default=bool(os.environ.get("SLOPSTOPPER_NO_TOPIC")), help="don't add the `slopstopper` repo topic via gh")
|
|
751
|
+
p.add_argument("--only", choices=["skills"], default=None, help="write only this part of the suite (skills: the two Claude Code skills) and touch nothing else")
|
|
752
|
+
|
|
753
|
+
|
|
693
754
|
def main(argv: list[str] | None = None) -> int:
|
|
694
755
|
"""Parse argv and dispatch.
|
|
695
756
|
|
|
@@ -1386,7 +1447,7 @@ def _print_profile_show(as_json: bool = False) -> int:
|
|
|
1386
1447
|
|
|
1387
1448
|
|
|
1388
1449
|
def _print_profile_expand(name: str | None, as_json: bool = False) -> int:
|
|
1389
|
-
"""The profile's unconditional list, one per line.
|
|
1450
|
+
"""The profile's unconditional list, one per line. The installer reads this
|
|
1390
1451
|
repo's effective set via `profile disabled` instead."""
|
|
1391
1452
|
workflows = profiles.expand(name or "")
|
|
1392
1453
|
if workflows is None:
|
|
@@ -1424,7 +1485,7 @@ def _print_profile_detect(as_json: bool = False) -> int:
|
|
|
1424
1485
|
output._emit("")
|
|
1425
1486
|
output._emit(" To adopt the suggestion, in .slopstopper.yml:")
|
|
1426
1487
|
output._emit(f" profile: {suggested}")
|
|
1427
|
-
output._emit(" then re-run install
|
|
1488
|
+
output._emit(" then re-run slopstopper install so the workflow set follows.")
|
|
1428
1489
|
return 0
|
|
1429
1490
|
|
|
1430
1491
|
|
|
@@ -139,9 +139,16 @@ def _headline(status: str, label: str, failures: list[str]) -> str:
|
|
|
139
139
|
thresholds exceeded while deliberately exiting 0, so a ❌ here would
|
|
140
140
|
contradict the ✅ the summary table shows for its green job. ⚠️ says
|
|
141
141
|
"look at this" without claiming the check failed.
|
|
142
|
+
|
|
143
|
+
`error` is exit 2, the check could not run: an unreadable lockfile, a
|
|
144
|
+
missing interpreter, a scanner that died. The bullets below it are
|
|
145
|
+
the cause, not findings, so the headline must not read as a verdict
|
|
146
|
+
on the repo (#567).
|
|
142
147
|
"""
|
|
143
148
|
if status == "pass":
|
|
144
149
|
return f"### ✅ {label}: passed"
|
|
150
|
+
if status == "error":
|
|
151
|
+
return f"### ⚠️ {label}: could not run"
|
|
145
152
|
icon, noun = ("⚠️", "alert") if status == "warn" else ("❌", "issue")
|
|
146
153
|
count = len(failures)
|
|
147
154
|
if count == 1:
|
|
@@ -162,7 +169,7 @@ def build_body(
|
|
|
162
169
|
"""Render the PR comment for one check.
|
|
163
170
|
|
|
164
171
|
`status` is the check's own exit status as the workflow saw it
|
|
165
|
-
('pass' / 'fail'). It is deliberately not inferred from the report
|
|
172
|
+
('pass' / 'fail' / 'warn' / 'error'). It is deliberately not inferred from the report
|
|
166
173
|
text, which varies per check and, for the advisory checks, says
|
|
167
174
|
"THRESHOLDS EXCEEDED" on a run that exits 0.
|
|
168
175
|
"""
|