Skip to content

Doug/fix example workflows to use socket container #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"

[project]
name = "socketsecurity"
version = "2.1.24"
version = "2.1.26"
requires-python = ">= 3.10"
license = {"file" = "LICENSE"}
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion socketsecurity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__ = 'socket.dev'
__version__ = '2.1.24'
__version__ = '2.1.26'
6 changes: 1 addition & 5 deletions workflows/bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
# This pipeline runs Socket Security scans on every commit to any branch
# The CLI automatically detects most information from the git repository

image: python:3.12-slim
image: socketdev/cli:latest

definitions:
steps:
- step: &socket-scan
name: Socket Security Scan
caches:
- pip
script:
- pip install --upgrade pip
- pip install socketsecurity
# Run Socket CLI with minimal required parameters
# The CLI automatically detects:
# - Repository name from git
Expand Down
10 changes: 3 additions & 7 deletions workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,15 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest

# Option 1: Use the official Socket CLI container (faster, more reliable)
container: socketdev/cli:latest

steps:
- uses: actions/checkout@v4
with:
# For PRs, fetch one additional commit for proper diff analysis
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Socket CLI
run: pip install socketsecurity --upgrade

- name: Run Socket Security Scan
env:
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_SECURITY_API_KEY }}
Expand Down
6 changes: 1 addition & 5 deletions workflows/gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ stages:

socket-security:
stage: security-scan
image: python:3.12-slim
image: socketdev/cli:latest

# Run on all branches and merge requests
rules:
Expand All @@ -23,10 +23,6 @@ socket-security:
paths:
- .cache/pip/

before_script:
- pip install --upgrade pip
- pip install socketsecurity

script:
# Run Socket CLI with minimal required parameters
# The CLI automatically detects:
Expand Down
Loading