@@ -5,7 +5,7 @@ Complete guide to integrating Socket Basics into your GitHub Actions workflows f
55## Table of Contents
66
77- [ Quick Start] ( #quick-start )
8- - [ Performance and Caching] ( #performance-and-caching ) * (maintainers: see [ releasing.md ] ( releasing.md ) ) *
8+ - [ Performance and Caching] ( #performance-and-caching )
99- [ Basic Configuration] ( #basic-configuration )
1010- [ Enterprise Features] ( #enterprise-features )
1111- [ Advanced Workflows] ( #advanced-workflows )
@@ -57,10 +57,10 @@ With just your `SOCKET_SECURITY_API_KEY`, all scanning configurations are manage
5757
5858# ## How the action is currently built
5959
60- When you reference `uses : SocketDev/socket-basics@v2.0.2`, GitHub Actions builds the
61- ` Dockerfile ` from source at the start of every workflow run. As of `1.1.3` the
62- Dockerfile uses a **multi-stage build** with BuildKit cache mounts, which provides
63- two categories of improvement :
60+ When you reference `uses : SocketDev/socket-basics@v2.0.2`, GitHub Actions pulls the
61+ pre-built image referenced by [`action.yml`](../action.yml). The historical multi-stage
62+ Docker build still matters for maintainers because it determines what lands in the
63+ published image :
6464
6565| Improvement | Benefit |
6666|-------------|---------|
@@ -69,27 +69,23 @@ two categories of improvement:
6969| `--mount=type=cache` for apt / uv / npm | Faster repeated builds locally and on self-hosted runners with a persistent cache |
7070
7171**On standard GitHub-hosted runners** (ephemeral, no persistent Docker cache between
72- jobs), the multi-stage improvement is most visible when the same runner picks up a
73- cached layer — typically within a workflow run or when GitHub's runner image itself
74- includes the base layers. Cold runs still download and run all tool-install steps.
72+ jobs), users mainly benefit from pulling a ready-made image instead of rebuilding
73+ Socket Basics from source in every workflow run.
7574
7675# ## Pre-built image
7776
7877Starting with v2, the action pulls a pre-built image from GHCR rather than
79- building from source on every run. Pinning to a specific version tag (e.g. `@v2.0.0 `)
78+ building from source on every run. Pinning to a specific version tag (e.g. `@v2.0.2 `)
8079means the action starts in seconds — the image is built, integration-tested, and
8180published before the release tag is ever created.
8281
83- > **Maintainers:** see [releasing.md](releasing.md) for the publish-before-tag
84- > release process and the PR checklist.
85-
8682# ## If you're running socket-basics outside of the GitHub Action
8783
8884If you run socket-basics in other CI systems (Jenkins, GitLab, CircleCI, etc.) or
8985as a standalone `docker run`, pull the pre-built image directly :
9086
9187` ` ` bash
92- docker pull ghcr.io/socketdev/socket-basics:1.1.3
88+ docker pull ghcr.io/socketdev/socket-basics:2.0.2
9389` ` `
9490
9591See [Local Docker Installation](local-install-docker.md) for usage examples.
@@ -104,15 +100,15 @@ is immediately affected. We've seen this happen across the ecosystem:
104100 A single bad push silently reaches all users with no review gate. This is
105101 structurally identical to `docker pull :latest` — the anti-pattern we
106102 explicitly warn against in our Docker docs.
107- - **Version tags** (`@v2.0.0 `) are better, but tags are mutable by default.
103+ - **Version tags** (`@v2.0.2 `) are better, but tags are mutable by default.
108104 A tag can be deleted and recreated pointing at a different commit. There are
109105 documented cases of this happening — maliciously and accidentally.
110106- **Commit SHAs** are the only truly immutable reference. A SHA cannot be
111107 reassigned. Combined with Dependabot, you get automated upgrades with a
112108 human review gate at zero ongoing maintenance cost.
113109
114110We don't publish a floating major tag (`v2`). We do publish immutable version
115- tags (`v2.0.0 `) protected by tag protection rules in GitHub — but SHA pinning
111+ tags (`v2.0.2 `) protected by tag protection rules in GitHub — but SHA pinning
116112is still the recommendation for defence in depth.
117113
118114# ## Pinning strategies
@@ -128,14 +124,14 @@ The only truly immutable reference. Dependabot keeps it current automatically.
128124` ` ` yaml
129125- name: Run Socket Basics
130126 # Dependabot keeps this SHA up to date — see .github/dependabot.yml setup below.
131- uses: SocketDev/socket-basics@<sha> # v2.0.0
127+ uses: SocketDev/socket-basics@<sha> # v2.0.2
132128 with:
133129 socket_security_api_key: ${{ secrets.SOCKET_SECURITY_API_KEY }}
134130` ` `
135131
136132Get the SHA for any release :
137133` ` ` bash
138- git ls-remote https://github.com/SocketDev/socket-basics refs/tags/v2.0.0
134+ git ls-remote https://github.com/SocketDev/socket-basics refs/tags/v2.0.2
139135` ` `
140136
141137---
@@ -168,7 +164,7 @@ updates:
168164` ` `
169165
170166Dependabot opens a PR for each new release, updating the SHA or version tag
171- and keeping the `# v2.0.0 ` comment in sync. You review, approve, and merge
167+ and keeping the `# v2.0.2 ` comment in sync. You review, approve, and merge
172168on your own schedule — automated upgrades with a human gate.
173169
174170---
@@ -178,7 +174,7 @@ on your own schedule — automated upgrades with a human gate.
178174| Strategy | Immutable? | Auto-updates | Review gate |
179175|---|---|---|---|
180176| `@v2` floating tag | ❌ (not published) | — | — |
181- | `@v2.0.0 ` + Dependabot | ✅ (tag protection enforced) | Yes (weekly PR) | Yes |
177+ | `@v2.0.2 ` + Dependabot | ✅ (tag protection enforced) | Yes (weekly PR) | Yes |
182178| `@<sha>` + Dependabot | ✅ always | Yes (weekly PR) | Yes |
183179
184180# # Basic Configuration
@@ -235,12 +231,21 @@ Include these in your workflow's `jobs.<job_id>.permissions` section.
235231- uses: SocketDev/socket-basics@v2.0.2
236232 with:
237233 github_token: ${{ secrets.GITHUB_TOKEN }}
238- # Scan Docker images (auto-enables container scanning)
239- container_images: 'myorg/myapp:latest,redis:7'
240- # Scan Dockerfiles (auto-enables Dockerfile scanning)
241- dockerfiles: 'Dockerfile,docker/Dockerfile.prod'
234+ # Trivy-backed container scanning is temporarily not available in the
235+ # pre-built GitHub Action image. Use a native install if you need it today.
236+ # See docs/local-installation.md.
242237` ` `
243238
239+ > [!NOTE]
240+ > Container and Dockerfile scanning remain part of Socket Basics, but the current
241+ > GitHub Action and pre-built image paths have Trivy-backed support temporarily
242+ > disabled while we complete additional security review of the underlying scanner
243+ > dependency path. If container or Dockerfile scanning is a near-term
244+ > requirement, the [native installation path](local-installation.md) remains
245+ > available as a temporary workaround while the pre-built path is under
246+ > additional review. Review the upstream install path and artifacts carefully
247+ > before adopting it in production CI.
248+
244249**Socket Tier 1 Reachability:**
245250` ` ` yaml
246251- uses: SocketDev/socket-basics@v2.0.2
@@ -298,7 +303,8 @@ Configure Socket Basics centrally from the [Socket Dashboard](https://socket.dev
298303 socket_security_api_key: ${{ secrets.SOCKET_SECURITY_API_KEY }}
299304` ` `
300305
301- > **Note:** You can also pass credentials using environment variables instead of the `with:` section:
306+ > [!NOTE]
307+ > You can also pass credentials using environment variables instead of the `with:` section:
302308> ```yaml
303309> - uses: SocketDev/socket-basics@v2.0.2
304310> env:
@@ -423,9 +429,6 @@ jobs:
423429 secret_scanning_enabled: 'true'
424430 socket_tier_1_enabled: 'true'
425431
426- # Container scanning
427- dockerfiles: 'Dockerfile'
428-
429432 # Notifications (Enterprise)
430433 slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
431434` ` `
@@ -480,6 +483,21 @@ jobs:
480483
481484# ## Container Security Pipeline
482485
486+ > [!NOTE]
487+ > Container and Dockerfile scanning remain part of Socket Basics, but the current
488+ > pre-built GitHub Action path has Trivy-backed support temporarily disabled while
489+ > we complete additional security review of the underlying scanner dependency path.
490+ > If container or Dockerfile scanning is a near-term requirement, the
491+ > [native installation path](local-installation.md) remains available as a
492+ > temporary workaround while the pre-built path is under additional review.
493+ > Review the upstream install path and artifacts carefully before adopting it in
494+ > production CI.
495+
496+ > [!WARNING]
497+ > This fallback path relies on upstream Trivy installation material outside the
498+ > pinned pre-built distribution model. Review the upstream install path and
499+ > artifacts carefully before using it in production CI.
500+
483501` ` ` yaml
484502name: Container Security
485503on:
@@ -504,19 +522,16 @@ jobs:
504522 - name: Build Docker Image
505523 run: docker build -t myapp:${{ github.sha }} .
506524
525+ - name: Install pinned Trivy
526+ run: |
527+ TRIVY_VERSION=0.69.3
528+ curl -fsSL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh \
529+ | sh -s -- -b /usr/local/bin "v${TRIVY_VERSION}"
530+
507531 - name: Scan Container
508- uses: SocketDev/socket-basics@v2.0.2
509- env:
510- GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
511- with:
512- github_token: ${{ secrets.GITHUB_TOKEN }}
513-
514- # Scan built image and Dockerfile
515- container_images: 'myapp:${{ github.sha }}'
516- dockerfiles: 'Dockerfile'
517-
518- # Additional Trivy options
519- trivy_vuln_enabled: 'true'
532+ run: |
533+ trivy image --exit-code 1 --severity HIGH,CRITICAL "myapp:${{ github.sha }}"
534+ trivy config --exit-code 1 --severity HIGH,CRITICAL Dockerfile
520535` ` `
521536
522537# ## Dockerfile Auto-Discovery
@@ -573,8 +588,10 @@ jobs:
573588 GITHUB_PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
574589 with:
575590 github_token: ${{ secrets.GITHUB_TOKEN }}
576- dockerfiles: ${{ needs.discover-dockerfiles.outputs.dockerfiles }}
577- trivy_vuln_enabled: 'true'
591+ # Dockerfile discovery remains useful context for future container
592+ # scanning support, but the current pre-built action image does not
593+ # execute Trivy-backed scans.
594+ verbose: 'true'
578595` ` `
579596
580597**How it works:**
@@ -674,12 +691,19 @@ See [`action.yml`](../action.yml) for the complete list of inputs.
674691- ` trufflehog_show_unverified` — Show unverified secrets
675692- ` socket_tier_1_enabled` — Socket Tier 1 reachability
676693
677- **Container Scanning:**
694+ **Container Scanning (configuration surface) :**
678695- ` container_images` — Comma-separated images to scan
679696- ` dockerfiles` — Comma-separated Dockerfiles to scan
680697- ` trivy_disabled_rules` — Trivy rules to disable
681698- ` trivy_vuln_enabled` — Enable vulnerability scanning
682699
700+ > [!NOTE]
701+ > These inputs remain part of the action interface, but the current pre-built
702+ > GitHub Action path has Trivy-backed support temporarily disabled while we
703+ > complete additional security review of the underlying scanner dependency path.
704+ > Use the [native installation path](local-installation.md) if container scanning
705+ > is a near-term requirement.
706+
683707**Notifications (Enterprise Required):**
684708- ` slack_webhook_url` — Slack webhook
685709- ` jira_url` , `jira_email`, `jira_api_token`, `jira_project` — Jira config
@@ -734,8 +758,13 @@ permissions:
734758**Problem:** Container image scanning fails.
735759
736760**Solutions:**
737- 1. Ensure Docker is available in runner
738- 2. For private images, add authentication :
761+ > [!NOTE]
762+ > The current pre-built GitHub Action path has Trivy-backed support temporarily
763+ > disabled while the underlying scanner dependency path remains under additional
764+ > security review. If container scanning is a near-term requirement, switch to a
765+ > native Trivy install in the workflow.
766+
767+ 1. For private images, add authentication :
739768` ` ` yaml
740769- name: Login to Registry
741770 run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
0 commit comments