Skip to content

Commit 3abb5f8

Browse files
committed
Fix all security issues found with zizmor
1 parent 0a50062 commit 3abb5f8

7 files changed

Lines changed: 41 additions & 23 deletions

File tree

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: Run Splunk AppInspect
22
description: Package a mock app containing the SDK and its dependencies, then validate it with AppInspect.
33

4-
inputs:
5-
mock-app-path:
6-
description: Path to app packaged for scanning with AppInspect
7-
required: true
8-
default: ./tests/system/test_apps/generating_app
9-
104
runs:
115
using: composite
126
steps:
@@ -16,13 +10,13 @@ runs:
1610
- name: Install the SDK and its dependencies into the mock app
1711
shell: bash
1812
run: |
19-
mkdir -p ${{ inputs.mock-app-path }}/bin/lib
20-
uv pip install ".[openai, anthropic, google]" --target ${{ inputs.mock-app-path }}/bin/lib
13+
mkdir -p ./tests/system/test_apps/generating_app/bin/lib
14+
uv pip install ".[openai, anthropic, google]" --target ./tests/system/test_apps/generating_app/bin/lib
2115
- name: Package the mock app
2216
shell: bash
2317
run: |
24-
cd ${{ inputs.mock-app-path }}
18+
cd ./tests/system/test_apps/generating_app
2519
tar -czf mock_app.tgz --exclude="__pycache__" bin default metadata
2620
- name: Validate the mock app with AppInspect
2721
shell: bash
28-
run: uvx splunk-appinspect inspect ${{ inputs.mock-app-path }}/mock_app.tgz --included-tags cloud
22+
run: uvx splunk-appinspect inspect ./tests/system/test_apps/generating_app/mock_app.tgz --included-tags cloud

‎.github/actions/setup-sdk-environment/action.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: Set up SDK environment
22
description: Perform all the shared setup steps
33

44
inputs:
5-
python-version:
6-
description: Python version used for this run
7-
required: true
8-
default: "3.13"
95
deps-group:
106
description: Dependency groups passed to `uv sync --group`
117
required: true
@@ -17,12 +13,12 @@ runs:
1713
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57
1814
with:
1915
version: 0.11.6
20-
python-version: ${{ inputs.python-version }}
16+
python-version: 3.13
2117
activate-environment: true
2218
enable-cache: true
2319
cache-python: true
2420
- name: Install dependencies from the ${{ inputs.deps-group }} group
2521
env:
2622
SDK_DEPS_GROUP: ${{ inputs.deps-group }}
2723
shell: bash
28-
run: SDK_DEPS_GROUP="${{ inputs.deps-group }}" make ci-install
24+
run: make ci-install

‎.github/dependabot.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ updates:
88
groups:
99
github-actions:
1010
patterns: ["*"]
11+
cooldown:
12+
default-days: 7
1113
- package-ecosystem: "uv"
1214
directory: "/"
1315
schedule:
1416
interval: "weekly"
1517
groups:
1618
python-uv-lock:
1719
patterns: ["*"]
20+
cooldown:
21+
default-days: 7

‎.github/workflows/appinspect.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
pull_request:
66
workflow_dispatch:
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions: {}
13+
814
env:
915
PYTHON_VERSION: 3.13
1016

‎.github/workflows/cd.yml‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
name: Python CD
1+
name: Python SDK CD
22
on:
33
push:
44
branches: [develop]
55
release:
66
types: [published]
77
workflow_dispatch:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: false
12+
13+
permissions: {}
14+
915
env:
1016
DIST_DIR: dist/
1117

@@ -26,15 +32,17 @@ jobs:
2632
deps-group: release
2733
- name: Set pre-release version
2834
if: startsWith(github.ref, 'refs/tags/') != true
35+
env:
36+
RUN_NUMBER: ${{ github.run_number }}
2937
run: |
3038
VERSION_BASE="$(uv version --short)"
31-
RUN_NUMBER="${{ github.run_number }}"
3239
uv version "${VERSION_BASE}.dev${RUN_NUMBER}"
3340
- name: Set release version
3441
if: startsWith(github.ref, 'refs/tags/') == true
42+
env:
43+
VERSION_TAG: ${{ github.event.release.tag_name }}
3544
run: |
36-
VERSION_TAG="${{ github.event.release.tag_name }}"
37-
[[ $VERSION_TAG != $(uv version --short) ]] && {
45+
[[ ${VERSION_TAG} != $(uv version --short) ]] && {
3846
printf "Git tag should be identical to version field in pyproject.toml"
3947
exit 1
4048
}
@@ -64,7 +72,7 @@ jobs:
6472
needs: build-distributables
6573
runs-on: ubuntu-latest
6674
permissions:
67-
id-token: write
75+
id-token: write # Required for OIDC-based trusted publishing to PyPI
6876
environment:
6977
name: splunk-test-pypi
7078
url: https://test.pypi.org/project/splunk-sdk/
@@ -84,7 +92,7 @@ jobs:
8492
needs: build-distributables
8593
runs-on: ubuntu-latest
8694
permissions:
87-
id-token: write
95+
id-token: write # Required for OIDC-based trusted publishing to PyPI
8896
environment:
8997
name: splunk-pypi
9098
url: https://pypi.org/project/splunk-sdk/

‎.github/workflows/lint.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
pull_request:
66
workflow_dispatch:
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions: {}
13+
814
jobs:
915
lint:
1016
runs-on: ubuntu-latest

‎.github/workflows/test.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1010
cancel-in-progress: true
1111

12+
permissions: {}
13+
1214
jobs:
1315
test:
1416
runs-on: ubuntu-latest
@@ -30,7 +32,9 @@ jobs:
3032
SPLUNKBASE_PASSWORD: ${{ secrets.SPLUNKBASE_PASSWORD }}
3133
run: uv run ./scripts/download_splunk_mcp_server_app.py
3234
- name: Launch Splunk Docker instance
33-
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
35+
env:
36+
SPLUNK_VERSION: ${{ matrix.splunk-version }}
37+
run: docker compose up -d
3438
- name: Set up .env
3539
run: cp .env.template .env
3640
- name: Write internal AI secrets to .env

0 commit comments

Comments
 (0)