Skip to content

Conversation

@dacoburn
Copy link
Collaborator

Description

The .hooks/version-check.py script was not updating all documentation files when the version changed. Several documentation files contained outdated CLI parameter examples and version references (e.g., --python-sast-enabled instead of --python, --secret-scanning-enabled instead of --secrets), and some files like blog.md, docs/local-install-docker.md, and docs/version-management.md were not included in the version update process at all.

Root Cause

The README_FILES list in .hooks/version-check.py only included 3 files (README.md, docs/github-action.md, docs/pre-commit-hook.md), missing several other documentation files that contain version references. Additionally, the regex patterns for matching Docker commands and image references were too narrow and didn't handle:

  • Docker build commands with existing version tags or --platform flags
  • Docker run commands with version tags
  • Various image naming patterns (e.g., myorg/security-scanner)

Fix

  1. Expanded README_FILES list to include all documentation files with version references:

    • Added blog.md
    • Added docs/local-install-docker.md
    • Added docs/version-management.md
    • Added docs/parameters.md (new comprehensive parameters reference)
  2. Enhanced regex patterns in version-check.py:

    • Updated DOCKER_BUILD_PATTERN to handle --platform flags and existing version tags
    • Added IMAGE_VERSION_PATTERN to match standalone image references (e.g., in docker run commands)
    • Improved replacement logic to preserve command prefixes
  3. Updated all documentation with correct CLI examples:

    • Created comprehensive docs/parameters.md with all current CLI options and environment variables
    • Fixed docs/local-install-docker.md examples to use current parameters (--python, --javascript, --secrets, --all-languages, --socket-tier1, --images, etc.)
    • Updated environment variable examples to use correct names
  4. Fixed incorrect Docker syntax in local-install-docker.md (removed invalid :latest after version tag)

All version references and CLI examples are now automatically updated by the version-check script and match the actual current CLI options.

Public Changelog

N/A

@dacoburn dacoburn requested a review from a team as a code owner October 21, 2025 06:05
@dacoburn dacoburn requested review from bmeck and trevnorris and removed request for a team October 21, 2025 06:05
@mtorp mtorp merged commit d33ea17 into main Oct 21, 2025
4 checks passed
@dacoburn dacoburn deleted the doug/fix-version-update-script branch October 27, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants