GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Eric/cus 9 - Socket CLI v2 (#50) · SocketDev/socket-python-cli@49156d4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github
    • PULL_REQUEST_TEMPLATE.md
    • PULL_REQUEST_TEMPLATE
      • bug-fix.md
      • feature.md
      • improvement.md
    • workflows
      • pr-preview.yml
      • release.yml
      • version-check.yml
  • .gitignore
  • .python-version
  • Dockerfile
  • Makefile
  • Pipfile.lock
  • Pipfile
  • README.md
  • pyproject.toml
  • pytest.ini
  • requirements-dev.lock
  • requirements.lock
  • requirements.txt
  • scripts
    • build_container.sh
    • deploy-test-docker.sh
    • deploy-test-pypi.sh
    • run.sh
  • socketsecurity
    • __init__.py
    • config.py
    • core
      • __init__.py
      • classes.py
      • cli_client.py
      • git_interface.py
      • github.py
      • gitlab.py
      • logging.py
      • messages.py
      • scm_comments.py
      • scm
        • __init__.py
        • base.py
        • client.py
        • github.py
        • gitlab.py
      • socket_config.py
      • utils.py
    • output.py
    • socketcli.py
  • tests
    • __init__.py
    • core
      • conftest.py
      • create_diff_input.json
      • test_diff_generation.py
      • test_package_and_alerts.py
      • test_sdk_methods.py
      • test_supporting_methods.py
    • data
      • fullscans
        • create_response.json
        • diff
          • stream_diff.json
          • stream_diff_full.json
        • head_scan
          • metadata.json
          • stream_scan.json
          • stream_scan_full.json
        • new_scan
          • metadata.json
          • stream_scan.json
      • repos
        • repo_info_error.json
        • repo_info_no_head.json
        • repo_info_success.json
      • settings
        • security-policy.json
    • unit
      • __init__.py
      • test_cli_config.py
      • test_client.py
      • test_config.py
      • test_output.py

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/PULL_REQUEST_TEMPLATE.md‎

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Click on the "Preview" tab and select appropriate PR template:
2+
3+
[New Feature](?expand=1&template=feature.md)
4+
[Bug Fix](?expand=1&template=bug-fix.md)
5+
[Improvement](?expand=1&template=improvement.md)
Collapse file

‎.github/PULL_REQUEST_TEMPLATE/bug-fix.md‎

Copy file name to clipboard
+19Lines changed: 19 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--Description: Briefly describe the bug and its impact. If there's a related Linear ticket or Sentry issue, link it here. ⬇️ -->
2+
3+
## Root Cause
4+
<!-- Concise explanation of what caused the bug ⬇️ -->
5+
6+
7+
8+
## Fix
9+
<!-- Explain how your changes address the bug ⬇️ -->
10+
11+
## Public Changelog
12+
<!-- Write a changelog message between comment tags if this should be included in the public product changelog, Leave blank otherwise. -->
13+
14+
<!-- changelog ⬇️-->
15+
N/A
16+
<!-- /changelog ⬆️ -->
17+
18+
19+
<!-- TEMPLATE TYPE DON'T REMOVE: python-cli-template-bug-fix -->
Collapse file

‎.github/PULL_REQUEST_TEMPLATE/feature.md‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- Description: Briefly describe the new feature you're introducing ⬇️ -->
2+
3+
4+
## Why?
5+
<!-- Explain the motivation behind this feature and its expected benefits ⬇️ -->
6+
7+
8+
9+
## Public Changelog
10+
<!-- Write a changelog message between comment tags if this should be included in the public product changelog. -->
11+
12+
<!-- changelog ⬇️-->
13+
N/A
14+
<!-- /changelog ⬆️ -->
15+
16+
<!-- TEMPLATE TYPE DON'T REMOVE: python-cli-template-feature -->
Collapse file

‎.github/PULL_REQUEST_TEMPLATE/improvement.md‎

Copy file name to clipboard
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!-- Description: Briefly describe the code improvement you're making. This could include things like lint fixes, adding monitoring dashboards, optimizing scripts, refactoring, etc. ⬇️ -->
2+
3+
## Public Changelog
4+
<!-- Write a changelog message between comment tags if this should be included in the public product changelog. -->
5+
6+
<!-- changelog ⬇️-->
7+
N/A
8+
<!-- /changelog ⬆️ -->
9+
10+
<!-- TEMPLATE TYPE DON'T REMOVE: python-cli-template-improvement -->
Collapse file

‎.github/workflows/pr-preview.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/pr-preview.yml
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Preview
22
on:
33
pull_request:
4-
types: [opened, synchronize]
4+
types: [opened, synchronize, ready_for_review]
55

66
jobs:
77
preview:
@@ -12,9 +12,15 @@ jobs:
1212
with:
1313
python-version: '3.x'
1414

15+
# Install all dependencies from pyproject.toml
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install -e .
20+
1521
- name: Set preview version
1622
run: |
17-
BASE_VERSION=$(grep -o "__version__.*" socketsecurity/__init__.py | awk '{print $3}' | tr -d "'")
23+
BASE_VERSION=$(python -c "from socketsecurity import __version__; print(__version__)")
1824
PREVIEW_VERSION="${BASE_VERSION}.dev${{ github.event.pull_request.number }}${{ github.event.pull_request.commits }}"
1925
echo "VERSION=${PREVIEW_VERSION}" >> $GITHUB_ENV
2026
@@ -25,7 +31,7 @@ jobs:
2531
2632
# Verify the change
2733
echo "Updated version in __init__.py:"
28-
cat socketsecurity/__init__.py | grep "__version__"
34+
python -c "from socketsecurity import __version__; print(__version__)"
2935
3036
- name: Check if version exists on Test PyPI
3137
id: version_check
Collapse file

‎.github/workflows/release.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
with:
1414
python-version: '3.x'
1515

16+
# Install all dependencies from pyproject.toml
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -e .
21+
1622
- name: Get Version
1723
id: version
1824
run: |
@@ -104,4 +110,4 @@ jobs:
104110
socketdev/cli:latest
105111
socketdev/cli:${{ env.VERSION }}
106112
build-args: |
107-
CLI_VERSION=${{ env.VERSION }}
113+
CLI_VERSION=${{ env.VERSION }}
Collapse file

‎.github/workflows/version-check.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/version-check.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Version Check
22
on:
33
pull_request:
4-
types: [opened, synchronize]
4+
types: [opened, synchronize, ready_for_review]
55
paths:
66
- 'socketsecurity/**'
77
- 'setup.py'
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ dist
66
*.build
77
*.dist
88
*.egg-info
9-
test
109
*.env
1110
run_container.sh
1211
*.zip
1312
bin
1413
scripts/*.py
1514
*.json
15+
!tests/**/*.json
1616
markdown_overview_temp.md
1717
markdown_security_temp.md
1818
.DS_Store
1919
*.pyc
2020
test.py
2121
*.cpython-312.pyc`
2222
file_generator.py
23-
.env.local
23+
.coverage
24+
.env.local
25+
Pipfile
Collapse file

‎.python-version‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12
Collapse file

‎Dockerfile‎

Copy file name to clipboard
+13-3Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
FROM python:3-alpine
22
LABEL org.opencontainers.image.authors="socket.dev"
33
ARG CLI_VERSION
4+
ARG SDK_VERSION
45
ARG PIP_INDEX_URL=https://pypi.org/simple
56
ARG PIP_EXTRA_INDEX_URL=https://pypi.org/simple
67

78
RUN apk update \
89
&& apk add --no-cache git nodejs npm yarn
910

10-
RUN pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socketsecurity==$CLI_VERSION \
11-
&& socketcli -v \
12-
&& socketcli -v | grep -q $CLI_VERSION
11+
# Install CLI with retries for TestPyPI propagation (10 attempts, 30s each = 5 minutes total)
12+
RUN for i in $(seq 1 10); do \
13+
echo "Attempt $i/10: Installing socketsecurity==$CLI_VERSION"; \
14+
if pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socketsecurity==$CLI_VERSION; then \
15+
break; \
16+
fi; \
17+
echo "Install failed, waiting 30s before retry..."; \
18+
sleep 30; \
19+
done && \
20+
if [ ! -z "$SDK_VERSION" ]; then \
21+
pip install --index-url ${PIP_INDEX_URL} --extra-index-url ${PIP_EXTRA_INDEX_URL} socket-sdk-python==${SDK_VERSION}; \
22+
fi

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.