diff --git a/CHANGELOG.md b/CHANGELOG.md index 2465ed7..4451c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,15 +8,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] -### Changed +## [3.5.0] - 2026-11-03 + +Minor rather than patch: Socket Tier 1 parses `socket_additional_params` +differently (#125) and needs new network access (#118), and either can break an +existing setup. -- **Behavior change:** `socket_additional_params` now uses shell-style, - space-separated arguments and preserves commas within argument values. A - comma acts as a legacy separator only when it is unquoted and followed by a - hyphen (normally another option). Configurations that used commas as general - separators (for example, `--view,full`) must use a space or `=` instead. Repeat - list-valued flags, such as - `--exclude-paths=tests --exclude-paths=fixtures`. +### Upgrade notes +- A comma between a Tier 1 option and its value is no longer a separator: + change `--reach-analysis-timeout,90s` to `--reach-analysis-timeout=90s`. + Comma-joined options such as `--view=full,--all` still split. (#125) +- Pass multiple exclusions as repeated `--exclude-paths` flags. (#125) + +### Fixed +- Socket Tier 1 keeps commas and quoted spaces inside `socket_additional_params` + values, so `--reach-ecosystems=npm,pypi` reaches the Socket CLI as one + argument. Malformed quoting fails with an `Invalid socket_additional_params` + error. (#125) ## [3.4.1] - 2026-10-21 diff --git a/README.md b/README.md index a182bd8..2d57c7f 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ jobs: - name: Run Socket Basics # Pin to a commit SHA for supply-chain safety. # Dependabot will keep this up to date automatically — see docs/github-action.md. - uses: SocketDev/socket-basics@ # v3.4.1 + uses: SocketDev/socket-basics@ # v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} with: @@ -179,10 +179,10 @@ For GitHub Actions, see the [Quick Start](#-quick-start---github-actions) above ```bash # Pull the pre-built image (recommended — no build step required) -docker pull ghcr.io/socketdev/socket-basics:3.4.1 +docker pull ghcr.io/socketdev/socket-basics:3.5.0 # Run scan -docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.4.1 \ +docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.5.0 \ --workspace /workspace \ --python \ --secrets \ diff --git a/action.yml b/action.yml index b9a38f3..bd3b264 100644 --- a/action.yml +++ b/action.yml @@ -4,7 +4,7 @@ author: "Socket" runs: using: "docker" - image: "docker://ghcr.io/socketdev/socket-basics:3.4.1" + image: "docker://ghcr.io/socketdev/socket-basics:3.5.0" env: # Core GitHub variables (these are automatically available, but we explicitly pass GITHUB_TOKEN) GITHUB_TOKEN: ${{ inputs.github_token }} diff --git a/docs/github-action.md b/docs/github-action.md index cfedadd..793e131 100644 --- a/docs/github-action.md +++ b/docs/github-action.md @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run Socket Basics - uses: SocketDev/socket-basics@v3.4.1 + uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} with: @@ -59,7 +59,7 @@ Without dashboard configuration, every scanner input defaults to off, so turn on ### How the action is currently built -When you reference `uses: SocketDev/socket-basics@v3.4.1`, GitHub Actions pulls the +When you reference `uses: SocketDev/socket-basics@v3.5.0`, GitHub Actions pulls the pre-built image referenced by [`action.yml`](../action.yml). The historical multi-stage Docker build still matters for maintainers because it determines what lands in the published image: @@ -77,7 +77,7 @@ Socket Basics from source in every workflow run. ### Pre-built image Starting with v2, the action pulls a pre-built image from GHCR rather than -building from source on every run. Pinning to a specific version tag (e.g. `@v3.4.1`) +building from source on every run. Pinning to a specific version tag (e.g. `@v3.5.0`) means the action starts in seconds — the image is built, integration-tested, and published before the release tag is ever created. @@ -87,7 +87,7 @@ If you run socket-basics in other CI systems (Jenkins, GitLab, CircleCI, etc.) o as a standalone `docker run`, pull the pre-built image directly: ```bash -docker pull ghcr.io/socketdev/socket-basics:3.4.1 +docker pull ghcr.io/socketdev/socket-basics:3.5.0 ``` See [Local Docker Installation](local-install-docker.md) for usage examples. @@ -103,7 +103,7 @@ is immediately affected. We've seen this happen across the ecosystem: publish `:latest`/`:latest-heavy` Docker aliases as an onboarding convenience, but treat them as exactly that — production pipelines should pin an exact version or digest.) -- **Version tags** (`@v3.4.1`) are better, but tags are mutable by default. +- **Version tags** (`@v3.5.0`) are better, but tags are mutable by default. A tag can be deleted and recreated pointing at a different commit. There are documented cases of this happening — maliciously and accidentally. - **Commit SHAs** are the only truly immutable reference. A SHA cannot be @@ -128,14 +128,14 @@ The only truly immutable reference. Dependabot keeps it current automatically. ```yaml - name: Run Socket Basics # Dependabot keeps this SHA up to date — see .github/dependabot.yml setup below. - uses: SocketDev/socket-basics@ # v3.4.1 + uses: SocketDev/socket-basics@ # v3.5.0 with: socket_security_api_key: ${{ secrets.SOCKET_SECURITY_API_KEY }} ``` Get the SHA for any release: ```bash -git ls-remote https://github.com/SocketDev/socket-basics refs/tags/v3.4.1 +git ls-remote https://github.com/SocketDev/socket-basics refs/tags/v3.5.0 ``` --- @@ -147,7 +147,7 @@ enforces tag protection rules). SHA pinning is still preferable for defence in depth. ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: socket_security_api_key: ${{ secrets.SOCKET_SECURITY_API_KEY }} ``` @@ -168,7 +168,7 @@ updates: ``` Dependabot opens a PR for each new release, updating the SHA or version tag -and keeping the `# v3.4.1` comment in sync. You review, approve, and merge +and keeping the `# v3.5.0` comment in sync. You review, approve, and merge on your own schedule — automated upgrades with a human gate. --- @@ -178,7 +178,7 @@ on your own schedule — automated upgrades with a human gate. | Strategy | Immutable? | Auto-updates | Review gate | |---|---|---|---| | `@v2` floating tag | ❌ (not published) | — | — | -| `@v3.4.1` + Dependabot | ✅ (tag protection enforced) | Yes (weekly PR) | Yes | +| `@v3.5.0` + Dependabot | ✅ (tag protection enforced) | Yes (weekly PR) | Yes | | `@` + Dependabot | ✅ always | Yes (weekly PR) | Yes | ## Basic Configuration @@ -219,7 +219,7 @@ Include these in your workflow's `jobs..permissions` section. **SAST (Static Analysis):** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} # Enable SAST for specific languages @@ -233,7 +233,7 @@ Include these in your workflow's `jobs..permissions` section. **Secret Scanning:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} secret_scanning_enabled: 'true' @@ -253,7 +253,7 @@ Include these in your workflow's `jobs..permissions` section. **Container Scanning:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} # Listing images or Dockerfiles auto-enables the matching Trivy scan. @@ -280,7 +280,7 @@ path that does not exist is skipped with a `Dockerfile not found` warning. **Socket Tier 1 Reachability:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} socket_tier_1_enabled: 'true' @@ -289,7 +289,7 @@ path that does not exist is skipped with a `Dockerfile not found` warning. ### Output Configuration ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} python_sast_enabled: 'true' @@ -327,7 +327,7 @@ jobs: fetch-depth: 0 - name: Run Socket Basics (changed files only) - uses: SocketDev/socket-basics@v3.4.1 + uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} with: @@ -456,7 +456,7 @@ Configure Socket Basics centrally from the [Socket Dashboard](https://socket.dev **Enable in workflow:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} with: @@ -469,7 +469,7 @@ Configure Socket Basics centrally from the [Socket Dashboard](https://socket.dev > [!NOTE] > You can also pass credentials using environment variables instead of the `with:` section: > ```yaml -> - uses: SocketDev/socket-basics@v3.4.1 +> - uses: SocketDev/socket-basics@v3.5.0 > env: > SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_SECURITY_API_KEY }} > with: @@ -540,7 +540,7 @@ directly as a step: run: docker build -t myapp:${{ github.sha }} . - name: Run Socket Basics - uses: docker://ghcr.io/socketdev/socket-basics:3.4.1 + uses: docker://ghcr.io/socketdev/socket-basics:3.5.0 env: SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_SECURITY_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -559,7 +559,7 @@ the dashboard. Running the image directly differs from the action in two ways: for some languages. - The step isn't tied to an action version, so update the image tag yourself when you upgrade. To pin by digest, append `@sha256:` to the image. - `docker buildx imagetools inspect ghcr.io/socketdev/socket-basics:3.4.1` + `docker buildx imagetools inspect ghcr.io/socketdev/socket-basics:3.5.0` prints the digest. See the [Parameters Reference](parameters.md) for every CLI flag. @@ -570,7 +570,7 @@ All notification integrations require Socket Enterprise. **Slack Notifications:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} socket_org: ${{ secrets.SOCKET_ORG }} @@ -582,7 +582,7 @@ All notification integrations require Socket Enterprise. **Jira Issue Creation:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} socket_org: ${{ secrets.SOCKET_ORG }} @@ -597,7 +597,7 @@ All notification integrations require Socket Enterprise. **Microsoft Teams:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} socket_org: ${{ secrets.SOCKET_ORG }} @@ -609,7 +609,7 @@ All notification integrations require Socket Enterprise. **Generic Webhook:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} socket_org: ${{ secrets.SOCKET_ORG }} @@ -621,7 +621,7 @@ All notification integrations require Socket Enterprise. **SIEM Integration:** ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} socket_org: ${{ secrets.SOCKET_ORG }} @@ -657,7 +657,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run Socket Basics - uses: SocketDev/socket-basics@v3.4.1 + uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} with: @@ -699,7 +699,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run Full Security Scan - uses: SocketDev/socket-basics@v3.4.1 + uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} with: @@ -765,7 +765,7 @@ jobs: run: docker build -t myapp:${{ github.sha }} . - name: Run Socket Basics (image + Dockerfile scan) - uses: SocketDev/socket-basics@v3.4.1 + uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} with: @@ -790,7 +790,7 @@ For repositories with multiple Dockerfiles across different directories, you can > > ```yaml > - name: Run Socket Basics -> uses: docker://ghcr.io/socketdev/socket-basics:3.4.1 +> uses: docker://ghcr.io/socketdev/socket-basics:3.5.0 > env: > SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_SECURITY_API_KEY }} > GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -847,7 +847,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run Socket Basics - uses: SocketDev/socket-basics@v3.4.1 + uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} with: @@ -905,7 +905,7 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Run Socket Basics - uses: SocketDev/socket-basics@v3.4.1 + uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} with: @@ -1070,7 +1070,7 @@ in the [name mapping](parameters.md#name-mapping). ```yaml steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - Must be first - - uses: SocketDev/socket-basics@v3.4.1 + - uses: SocketDev/socket-basics@v3.5.0 ``` ### PR Comments Not Appearing diff --git a/docs/github-pr-comment-guide.md b/docs/github-pr-comment-guide.md index ca8d21b..f34579c 100644 --- a/docs/github-pr-comment-guide.md +++ b/docs/github-pr-comment-guide.md @@ -315,7 +315,7 @@ PR. This is for teams who want to review finding quality in the Socket dashboard first, without every PR growing a comment that developers have to scroll past. ```yaml -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 with: socket_security_api_key: ${{ secrets.SOCKET_SECURITY_API_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/docs/local-install-docker.md b/docs/local-install-docker.md index c928b5f..a79fc74 100644 --- a/docs/local-install-docker.md +++ b/docs/local-install-docker.md @@ -16,7 +16,7 @@ Run Socket Basics locally using Docker without installing security tools on your ```bash # 1. Pull a pinned release from GHCR (no build step required) -docker pull ghcr.io/socketdev/socket-basics:3.4.1 +docker pull ghcr.io/socketdev/socket-basics:3.5.0 # 2. Create .env file with your credentials (the API key is environment-only; # the organization can also be passed per run with --socket-org) @@ -29,14 +29,14 @@ EOF docker run --rm \ -v "$PWD:/workspace" \ --env-file .env \ - ghcr.io/socketdev/socket-basics:3.4.1 \ + ghcr.io/socketdev/socket-basics:3.5.0 \ --workspace /workspace \ --python \ --secrets \ --console-tabular-enabled ``` -The Docker image should always be pinned to an exact version such as `3.4.1`. Avoid +The Docker image should always be pinned to an exact version such as `3.5.0`. Avoid floating tags like `:latest` in CI/CD. ## Using Pre-built Images @@ -46,13 +46,13 @@ The baked-in security tool versions are recorded in the image labels so you can inspect exactly what's inside: ```bash -docker inspect ghcr.io/socketdev/socket-basics:3.4.1 \ +docker inspect ghcr.io/socketdev/socket-basics:3.5.0 \ | jq '.[0].Config.Labels' # { # "com.socket.trivy-version": "0.76.1", # "com.socket.trufflehog-version": "3.96.0", # "com.socket.opengrep-version": "v1.26.0", -# "org.opencontainers.image.version": "3.4.1", +# "org.opencontainers.image.version": "3.5.0", # ... # } ``` @@ -90,8 +90,8 @@ tool: `socketcli` runs the Python CLI; `socket-basics`, or any other argument, runs Socket Basics: ```bash -docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.4.1-heavy socketcli --help -docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.4.1-heavy --workspace /workspace --python +docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.5.0-heavy socketcli --help +docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.5.0-heavy --workspace /workspace --python ``` `latest` and `latest-heavy` are floating aliases published for onboarding @@ -109,7 +109,7 @@ comments and labels. If you must run the image directly, pin the exact version: -v "$GITHUB_WORKSPACE:/workspace" \ -e SOCKET_SECURITY_API_KEY=${{ secrets.SOCKET_SECURITY_API_KEY }} \ -e SOCKET_ORG=${{ secrets.SOCKET_ORG }} \ - ghcr.io/socketdev/socket-basics:3.4.1 \ + ghcr.io/socketdev/socket-basics:3.5.0 \ --workspace /workspace \ --python \ --javascript \ @@ -122,7 +122,7 @@ comments and labels. If you must run the image directly, pin the exact version: ```yaml security-scan: image: - name: ghcr.io/socketdev/socket-basics:3.4.1 + name: ghcr.io/socketdev/socket-basics:3.5.0 entrypoint: [""] # GitLab needs a shell; the image's entrypoint is socket-basics stage: test script: @@ -141,7 +141,7 @@ security-scan: ```dockerfile # Pin socket-basics and let Dependabot send upgrade PRs automatically -FROM ghcr.io/socketdev/socket-basics:3.4.1 +FROM ghcr.io/socketdev/socket-basics:3.5.0 ``` ### Staying Up to Date with Dependabot @@ -159,7 +159,7 @@ updates: interval: "weekly" ``` -Dependabot will detect the `FROM ghcr.io/socketdev/socket-basics:3.4.1` reference +Dependabot will detect the `FROM ghcr.io/socketdev/socket-basics:3.5.0` reference and open a PR with the version bump when a new release is available. ## Building the Docker Image @@ -170,10 +170,10 @@ Pull a specific release without building locally: ```bash # GHCR (preferred) -docker pull ghcr.io/socketdev/socket-basics:3.4.1 +docker pull ghcr.io/socketdev/socket-basics:3.5.0 # Docker Hub -docker pull socketdev/socket-basics:3.4.1 +docker pull socketdev/socket-basics:3.5.0 ``` ### Build from Source @@ -186,7 +186,7 @@ git clone https://github.com/SocketDev/socket-basics.git cd socket-basics # Build with version tag (multi-stage; first build is slower, subsequent ones are fast) -docker build -t socket-basics:3.4.1 . +docker build -t socket-basics:3.5.0 . # Verify the build docker images | grep socket-basics @@ -195,7 +195,7 @@ docker images | grep socket-basics ### Build for a Specific Platform (M1/M2 Macs) ```bash -docker build --platform linux/amd64 -t socket-basics:3.4.1 . +docker build --platform linux/amd64 -t socket-basics:3.5.0 . ``` ### Build with Custom Tool Versions @@ -206,7 +206,7 @@ The image pins the bundled tools to specific versions. You can override them at docker build \ --build-arg TRUFFLEHOG_VERSION=3.96.0 \ --build-arg OPENGREP_VERSION=v1.26.0 \ - -t socket-basics:3.4.1 . + -t socket-basics:3.5.0 . ``` Trivy comes from a Socket-built image pinned by digest via the `TRIVY_IMAGE` @@ -219,13 +219,13 @@ tests image, build from the `app_tests` directory and use the same build args. ```bash # The image's entrypoint is `socket-basics`, so its own flags need no prefix -docker run --rm socket-basics:3.4.1 --version +docker run --rm socket-basics:3.5.0 --version # Other bundled tools need --entrypoint -docker run --rm --entrypoint socket socket-basics:3.4.1 --version -docker run --rm --entrypoint opengrep socket-basics:3.4.1 --version -docker run --rm --entrypoint trufflehog socket-basics:3.4.1 --version -docker run --rm --entrypoint trivy socket-basics:3.4.1 --version +docker run --rm --entrypoint socket socket-basics:3.5.0 --version +docker run --rm --entrypoint opengrep socket-basics:3.5.0 --version +docker run --rm --entrypoint trufflehog socket-basics:3.5.0 --version +docker run --rm --entrypoint trivy socket-basics:3.5.0 --version ``` ### Smoke Test @@ -260,7 +260,7 @@ Mount your project directory into the container: # Scan current directory docker run --rm \ -v "$PWD:/workspace" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --python \ --secrets \ @@ -277,7 +277,7 @@ docker run --rm \ # Scan a specific project directory docker run --rm \ -v "/path/to/your/project:/workspace" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --javascript \ --secrets @@ -288,7 +288,7 @@ docker run --rm \ ```bash docker run --rm \ -v "$PWD:/workspace" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --all-languages \ --secrets \ @@ -341,7 +341,7 @@ INPUT_VERBOSE=false docker run --rm \ -v "$PWD:/workspace" \ --env-file .env \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --python \ --secrets @@ -356,7 +356,7 @@ docker run --rm \ -v "$PWD:/workspace" \ -e "SOCKET_SECURITY_API_KEY=scrt_your_api_key" \ -e "SOCKET_ORG=your-org-slug" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --python \ --secrets \ @@ -378,7 +378,7 @@ docker run --rm \ --env-file .env.socket \ --env-file .env.notifiers \ --env-file .env.scanning \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --all-languages ``` @@ -397,7 +397,7 @@ docker run --rm \ -v "$PWD:/workspace" \ -e "SOCKET_SECURITY_API_KEY=$SOCKET_SECURITY_API_KEY" \ -e "SOCKET_ORG=$SOCKET_ORG" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --python ``` @@ -424,7 +424,7 @@ docker run --rm \ -e GITHUB_TOKEN \ -e GITHUB_REPOSITORY=owner/repo \ -e GITHUB_PR_NUMBER=123 \ - ghcr.io/socketdev/socket-basics:3.4.1 \ + ghcr.io/socketdev/socket-basics:3.5.0 \ --workspace /workspace \ --python --javascript --secrets ``` @@ -463,7 +463,7 @@ mkdir -p ./scan-results docker run --rm \ -v "$PWD:/workspace" \ --env-file .env \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --python \ --secrets \ @@ -488,7 +488,7 @@ docker run --rm -it \ -v "$PWD:/workspace" \ --env-file .env \ --entrypoint /bin/bash \ - socket-basics:3.4.1 + socket-basics:3.5.0 # Inside container, run commands manually: # cd /workspace @@ -517,7 +517,7 @@ docker run --rm \ -v "$PWD:/workspace" \ -v "$PWD/socket-config.json:/config.json" \ --env-file .env \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --config /config.json ``` @@ -541,7 +541,7 @@ for PROJECT in "${PROJECTS[@]}"; do docker run --rm \ -v "$PROJECT:/workspace" \ --env-file .env \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --all-languages \ --secrets \ @@ -584,7 +584,7 @@ pipeline { script { // --entrypoint='' is required: Jenkins runs `cat` to keep the // container alive, and the image's entrypoint is socket-basics. - docker.image('ghcr.io/socketdev/socket-basics:3.4.1').inside( + docker.image('ghcr.io/socketdev/socket-basics:3.5.0').inside( "--entrypoint='' -v ${WORKSPACE}:/workspace --env-file .env" ) { sh ''' @@ -607,7 +607,7 @@ pipeline { ```yaml security-scan: image: - name: ghcr.io/socketdev/socket-basics:3.4.1 + name: ghcr.io/socketdev/socket-basics:3.5.0 entrypoint: [""] # GitLab needs a shell; the image's entrypoint is socket-basics stage: test script: @@ -650,7 +650,7 @@ security-scan: ```bash docker run --rm \ -v "$(pwd):/workspace" \ # Use $(pwd) instead of $PWD - socket-basics:3.4.1 + socket-basics:3.5.0 ``` 2. Verify mount (the entrypoint is `socket-basics`, so override it to run `ls`): @@ -658,7 +658,7 @@ security-scan: docker run --rm \ -v "$PWD:/workspace" \ --entrypoint ls \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ -la /workspace ``` @@ -688,7 +688,7 @@ security-scan: docker run --rm \ -v "$PWD:/workspace" \ --env-file "$(pwd)/.env" \ - socket-basics:3.4.1 + socket-basics:3.5.0 ``` ### Container Image Too Large @@ -719,7 +719,7 @@ security-scan: ```bash docker run --rm \ -v "$PWD:/workspace" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --python \ --secrets \ @@ -740,7 +740,7 @@ security-scan: ```bash docker run --rm \ -v "$PWD:/workspace" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --output /workspace/results.json # Save to mounted directory ``` @@ -751,7 +751,7 @@ security-scan: mkdir -p ./scan-results docker run --rm \ -v "$PWD:/workspace" \ - socket-basics:3.4.1 \ + socket-basics:3.5.0 \ --workspace /workspace \ --output /workspace/scan-results/scan.json ``` @@ -784,7 +784,7 @@ Add these to your `~/.bashrc` or `~/.zshrc` for quick access: ```bash # Socket Basics Docker aliases -alias sb-docker='docker run --rm -v "$PWD:/workspace" --env-file .env ghcr.io/socketdev/socket-basics:3.4.1 --workspace /workspace' +alias sb-docker='docker run --rm -v "$PWD:/workspace" --env-file .env ghcr.io/socketdev/socket-basics:3.5.0 --workspace /workspace' alias sb-quick='sb-docker --secrets --console-tabular-enabled' alias sb-python='sb-docker --python --secrets --console-tabular-enabled' alias sb-js='sb-docker --javascript --secrets --console-tabular-enabled' @@ -810,7 +810,7 @@ sb-all 1. **Use pre-built images** — Pull `ghcr.io/socketdev/socket-basics:` instead of building locally 2. **Use the standard image** — `-heavy` exists for one deployment constraint (see [Image Variants](#image-variants)); it adds nothing to Socket Basics -3. **Pin to a specific version** — Avoid `:latest` in production CI; pin to `3.4.1` and upgrade deliberately +3. **Pin to a specific version** — Avoid `:latest` in production CI; pin to `3.5.0` and upgrade deliberately 4. **Use Dependabot** — Reference the image in your Dockerfile/Compose to get automatic upgrade PRs 5. **Inspect baked-in labels** — Run `docker inspect | jq '.[0].Config.Labels'` to verify tool versions 6. **Use .env files** — Keep credentials out of command history @@ -830,7 +830,7 @@ set -e # Configuration PROJECT_DIR="$(pwd)" RESULTS_DIR="scan-results" # relative to the project: it must stay inside the workspace -IMAGE_NAME="ghcr.io/socketdev/socket-basics:3.4.1" +IMAGE_NAME="ghcr.io/socketdev/socket-basics:3.5.0" ENV_FILE=".env" # Create results directory (add it to .gitignore) diff --git a/docs/parameters.md b/docs/parameters.md index 414f81e..1713fc9 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -310,7 +310,7 @@ workflow and pass it in yourself: run: echo "ref=$(gh pr view ${{ github.event.issue.number }} --json baseRefName -q .baseRefName)" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} -- uses: SocketDev/socket-basics@v3.4.1 +- uses: SocketDev/socket-basics@v3.5.0 env: GITHUB_BASE_REF: ${{ steps.prbase.outputs.ref }} with: diff --git a/docs/pre-commit-hook.md b/docs/pre-commit-hook.md index c160969..c15de4d 100644 --- a/docs/pre-commit-hook.md +++ b/docs/pre-commit-hook.md @@ -41,7 +41,7 @@ Best for: Teams wanting consistent environments without installing security tool ```bash # Pull the pre-built image (no build step required) -docker pull ghcr.io/socketdev/socket-basics:3.4.1 +docker pull ghcr.io/socketdev/socket-basics:3.5.0 ``` **2. Create pre-commit hook:** @@ -64,7 +64,7 @@ fi # Run Socket Basics in Docker docker run --rm \ -v "$PWD:/workspace" \ - ghcr.io/socketdev/socket-basics:3.4.1 \ + ghcr.io/socketdev/socket-basics:3.5.0 \ --workspace /workspace \ --python \ --javascript \ @@ -118,7 +118,7 @@ fi # Scope the scan to the staged changes docker run --rm \ -v "$PWD:/workspace" \ - ghcr.io/socketdev/socket-basics:3.4.1 \ + ghcr.io/socketdev/socket-basics:3.5.0 \ --workspace /workspace \ --changed-files auto \ --python \ @@ -153,7 +153,7 @@ docker run --rm \ -e SOCKET_ORG="$SOCKET_ORG" \ -e SOCKET_SECURITY_API_KEY="$SOCKET_SECURITY_API_KEY" \ -e SLACK_WEBHOOK_URL="$SLACK_WEBHOOK_URL" \ - ghcr.io/socketdev/socket-basics:3.4.1 \ + ghcr.io/socketdev/socket-basics:3.5.0 \ --workspace /workspace \ --python \ --javascript \ @@ -504,7 +504,7 @@ repos: hooks: - id: socket-basics name: Socket Basics Security Scan - entry: docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.4.1 --workspace /workspace --changed-files auto --python --secrets + entry: docker run --rm -v "$PWD:/workspace" ghcr.io/socketdev/socket-basics:3.5.0 --workspace /workspace --changed-files auto --python --secrets language: system pass_filenames: false ``` diff --git a/pyproject.toml b/pyproject.toml index b763318..8e40f18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "socket_basics" -version = "3.4.1" +version = "3.5.0" description = "Socket Basics with integrated SAST, secret scanning, and container analysis" readme = "README.md" requires-python = ">=3.10" diff --git a/socket_basics/__init__.py b/socket_basics/__init__.py index 397e0bf..b57c1e6 100644 --- a/socket_basics/__init__.py +++ b/socket_basics/__init__.py @@ -12,7 +12,7 @@ from .socket_basics import SecurityScanner, main from .core.config import load_config_from_env, Config -__version__ = "3.4.1" +__version__ = "3.5.0" __author__ = "Socket.dev" __email__ = "support@socket.dev" diff --git a/socket_basics/version.py b/socket_basics/version.py index a5cfdf5..dcbfb52 100644 --- a/socket_basics/version.py +++ b/socket_basics/version.py @@ -1 +1 @@ -__version__ = "3.4.1" +__version__ = "3.5.0" diff --git a/uv.lock b/uv.lock index ada5c55..0e73706 100644 --- a/uv.lock +++ b/uv.lock @@ -692,7 +692,7 @@ wheels = [ [[package]] name = "socket-basics" -version = "3.4.1" +version = "3.5.0" source = { editable = "." } dependencies = [ { name = "certifi" },