http-api-tool 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/build-test-release.yaml +11 -11
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/build-test.yaml +130 -12
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/dependencies.yaml +1 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/documentation.yaml +1 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/openssf-scorecard.yaml +1 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/release-drafter.yaml +1 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/security-scans.yaml +1 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/semantic-pull-request.yaml +1 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/verify-gha-versions.yaml +1 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.pre-commit-config.yaml +11 -2
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/PKG-INFO +2 -1
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/action.yaml +3 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/pyproject.toml +21 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/src/http_api_tool/_version.py +2 -2
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/src/http_api_tool/cli.py +9 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.actrc +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.codespell +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.dockerignore +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.editorconfig +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/cache-config.yaml +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/dependabot.yml +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/release-drafter.yml +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.github/workflows/codeql.yml +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.gitignore +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.gitlint +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.readthedocs.yml +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/.yamllint +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/CHANGELOG-v0.2.0.md +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/Dockerfile +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/LICENSE +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/LICENSES/Apache-2.0.txt +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/Makefile +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/README.md +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/REUSE.toml +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/UV-QUICK-REFERENCE.md +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/scripts/check-pip-security.py +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/scripts/generate_requirements.py +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/sonar-project.properties +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/src/http_api_tool/__init__.py +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/src/http_api_tool/__main__.py +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/src/http_api_tool/verifier.py +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/tests/test_http_api_tool.py +0 -0
- {http_api_tool-1.0.1 → http_api_tool-1.0.2}/uv.lock +0 -0
|
@@ -33,7 +33,7 @@ jobs:
|
|
|
33
33
|
tag: "${{ steps.tag-validate.outputs.tag }}"
|
|
34
34
|
steps:
|
|
35
35
|
# Harden the runner used by this workflow
|
|
36
|
-
- uses: step-security/harden-runner@
|
|
36
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
37
37
|
with:
|
|
38
38
|
egress-policy: 'audit'
|
|
39
39
|
|
|
@@ -61,7 +61,7 @@ jobs:
|
|
|
61
61
|
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
62
62
|
steps:
|
|
63
63
|
# Harden the runner used by this workflow
|
|
64
|
-
- uses: step-security/harden-runner@
|
|
64
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
65
65
|
with:
|
|
66
66
|
egress-policy: 'audit'
|
|
67
67
|
|
|
@@ -111,7 +111,7 @@ jobs:
|
|
|
111
111
|
timeout-minutes: 12
|
|
112
112
|
steps:
|
|
113
113
|
# Harden the runner used by this workflow
|
|
114
|
-
- uses: step-security/harden-runner@
|
|
114
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
115
115
|
with:
|
|
116
116
|
egress-policy: 'audit'
|
|
117
117
|
|
|
@@ -160,7 +160,7 @@ jobs:
|
|
|
160
160
|
timeout-minutes: 10
|
|
161
161
|
steps:
|
|
162
162
|
# Harden the runner used by this workflow
|
|
163
|
-
- uses: step-security/harden-runner@
|
|
163
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
164
164
|
with:
|
|
165
165
|
egress-policy: 'audit'
|
|
166
166
|
|
|
@@ -211,7 +211,7 @@ jobs:
|
|
|
211
211
|
timeout-minutes: 5
|
|
212
212
|
steps:
|
|
213
213
|
# Harden the runner used by this workflow
|
|
214
|
-
- uses: step-security/harden-runner@
|
|
214
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
215
215
|
with:
|
|
216
216
|
egress-policy: 'audit'
|
|
217
217
|
|
|
@@ -246,7 +246,7 @@ jobs:
|
|
|
246
246
|
packages: write
|
|
247
247
|
steps:
|
|
248
248
|
# Harden the runner used by this workflow
|
|
249
|
-
- uses: step-security/harden-runner@
|
|
249
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
250
250
|
with:
|
|
251
251
|
egress-policy: 'audit'
|
|
252
252
|
|
|
@@ -267,7 +267,7 @@ jobs:
|
|
|
267
267
|
# Extract metadata for tags and labels
|
|
268
268
|
- name: Extract metadata
|
|
269
269
|
id: meta
|
|
270
|
-
uses: docker/metadata-action@
|
|
270
|
+
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0
|
|
271
271
|
with:
|
|
272
272
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
273
273
|
tags: |
|
|
@@ -322,7 +322,7 @@ jobs:
|
|
|
322
322
|
timeout-minutes: 5
|
|
323
323
|
steps:
|
|
324
324
|
# Harden the runner used by this workflow
|
|
325
|
-
- uses: step-security/harden-runner@
|
|
325
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
326
326
|
with:
|
|
327
327
|
egress-policy: 'audit'
|
|
328
328
|
|
|
@@ -363,7 +363,7 @@ jobs:
|
|
|
363
363
|
steps:
|
|
364
364
|
# Harden the runner used by this workflow
|
|
365
365
|
# yamllint disable-line rule:line-length
|
|
366
|
-
- uses: step-security/harden-runner@
|
|
366
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
367
367
|
with:
|
|
368
368
|
egress-policy: 'audit'
|
|
369
369
|
|
|
@@ -394,7 +394,7 @@ jobs:
|
|
|
394
394
|
timeout-minutes: 5
|
|
395
395
|
steps:
|
|
396
396
|
# Harden the runner used by this workflow
|
|
397
|
-
- uses: step-security/harden-runner@
|
|
397
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
398
398
|
with:
|
|
399
399
|
egress-policy: 'audit'
|
|
400
400
|
|
|
@@ -432,7 +432,7 @@ jobs:
|
|
|
432
432
|
timeout-minutes: 10
|
|
433
433
|
steps:
|
|
434
434
|
# Harden the runner used by this workflow
|
|
435
|
-
- uses: step-security/harden-runner@
|
|
435
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
436
436
|
with:
|
|
437
437
|
egress-policy: 'audit'
|
|
438
438
|
|
|
@@ -76,7 +76,7 @@ jobs:
|
|
|
76
76
|
steps:
|
|
77
77
|
# Harden the runner
|
|
78
78
|
- name: Harden Runner
|
|
79
|
-
uses: step-security/harden-runner@
|
|
79
|
+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
80
80
|
with:
|
|
81
81
|
egress-policy: audit
|
|
82
82
|
|
|
@@ -203,7 +203,7 @@ jobs:
|
|
|
203
203
|
steps:
|
|
204
204
|
# Harden the runner
|
|
205
205
|
- name: Harden Runner
|
|
206
|
-
uses: step-security/harden-runner@
|
|
206
|
+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
207
207
|
with:
|
|
208
208
|
egress-policy: audit
|
|
209
209
|
|
|
@@ -225,7 +225,7 @@ jobs:
|
|
|
225
225
|
# Extract metadata for tags and labels
|
|
226
226
|
- name: Extract metadata
|
|
227
227
|
id: meta
|
|
228
|
-
uses: docker/metadata-action@
|
|
228
|
+
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0
|
|
229
229
|
with:
|
|
230
230
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
231
231
|
tags: |
|
|
@@ -280,7 +280,7 @@ jobs:
|
|
|
280
280
|
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
281
281
|
steps:
|
|
282
282
|
# Harden the runner used by this workflow
|
|
283
|
-
- uses: step-security/harden-runner@
|
|
283
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
284
284
|
with:
|
|
285
285
|
egress-policy: 'audit'
|
|
286
286
|
|
|
@@ -328,7 +328,7 @@ jobs:
|
|
|
328
328
|
timeout-minutes: 12
|
|
329
329
|
steps:
|
|
330
330
|
# Harden the runner used by this workflow
|
|
331
|
-
- uses: step-security/harden-runner@
|
|
331
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
332
332
|
with:
|
|
333
333
|
egress-policy: audit
|
|
334
334
|
|
|
@@ -378,7 +378,7 @@ jobs:
|
|
|
378
378
|
timeout-minutes: 10
|
|
379
379
|
steps:
|
|
380
380
|
# Harden the runner used by this workflow
|
|
381
|
-
- uses: step-security/harden-runner@
|
|
381
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
382
382
|
with:
|
|
383
383
|
egress-policy: 'audit'
|
|
384
384
|
|
|
@@ -424,7 +424,7 @@ jobs:
|
|
|
424
424
|
timeout-minutes: 10
|
|
425
425
|
steps:
|
|
426
426
|
# Harden the runner used by this workflow
|
|
427
|
-
- uses: step-security/harden-runner@
|
|
427
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
428
428
|
with:
|
|
429
429
|
egress-policy: 'audit'
|
|
430
430
|
|
|
@@ -488,7 +488,7 @@ jobs:
|
|
|
488
488
|
timeout-minutes: 15
|
|
489
489
|
steps:
|
|
490
490
|
# Harden the runner used by this workflow
|
|
491
|
-
- uses: step-security/harden-runner@
|
|
491
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
492
492
|
with:
|
|
493
493
|
egress-policy: 'audit'
|
|
494
494
|
|
|
@@ -615,7 +615,7 @@ jobs:
|
|
|
615
615
|
timeout-minutes: 10
|
|
616
616
|
steps:
|
|
617
617
|
# Harden the runner used by this workflow
|
|
618
|
-
- uses: step-security/harden-runner@
|
|
618
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
619
619
|
with:
|
|
620
620
|
egress-policy: 'audit'
|
|
621
621
|
|
|
@@ -664,6 +664,124 @@ jobs:
|
|
|
664
664
|
run: |
|
|
665
665
|
docker rm -f go-httpbin || true
|
|
666
666
|
|
|
667
|
+
# Test deployment modes (uvx vs docker) to verify localhost URL handling
|
|
668
|
+
deployment-mode-tests:
|
|
669
|
+
name: 'Deployment Mode Tests (uvx vs docker)'
|
|
670
|
+
runs-on: ubuntu-latest
|
|
671
|
+
needs: [integration-tests]
|
|
672
|
+
permissions:
|
|
673
|
+
contents: read
|
|
674
|
+
timeout-minutes: 10
|
|
675
|
+
steps:
|
|
676
|
+
# Harden the runner used by this workflow
|
|
677
|
+
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
|
678
|
+
with:
|
|
679
|
+
egress-policy: 'audit'
|
|
680
|
+
|
|
681
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
682
|
+
|
|
683
|
+
# Start go-httpbin service for testing
|
|
684
|
+
- name: Setup go-httpbin service
|
|
685
|
+
id: go-httpbin
|
|
686
|
+
uses: lfreleng-actions/go-httpbin-action@fd9c3701056fc2e667542ac66b4a63c44faea6c5 # v0.1.0
|
|
687
|
+
with:
|
|
688
|
+
port: '8080'
|
|
689
|
+
debug: 'true'
|
|
690
|
+
skip-readiness-check: 'true'
|
|
691
|
+
|
|
692
|
+
- name: Verify service URL uses localhost
|
|
693
|
+
run: |
|
|
694
|
+
SERVICE_URL="${{ steps.go-httpbin.outputs.service-url }}"
|
|
695
|
+
echo "Service URL: $SERVICE_URL"
|
|
696
|
+
if [[ "$SERVICE_URL" != *"localhost"* ]]; then
|
|
697
|
+
echo "ERROR: Service URL should contain 'localhost' for host-based testing"
|
|
698
|
+
exit 1
|
|
699
|
+
fi
|
|
700
|
+
echo "✅ Service URL correctly uses localhost"
|
|
701
|
+
|
|
702
|
+
- name: Test uvx deployment (default) with localhost URL
|
|
703
|
+
uses: ./
|
|
704
|
+
with:
|
|
705
|
+
deploy: 'uvx'
|
|
706
|
+
url: '${{ steps.go-httpbin.outputs.service-url }}/get'
|
|
707
|
+
service_name: 'UVX Deployment Test'
|
|
708
|
+
expected_http_code: 200
|
|
709
|
+
retries: 3
|
|
710
|
+
initial_sleep_time: 1
|
|
711
|
+
verify_ssl: 'false'
|
|
712
|
+
debug: 'true'
|
|
713
|
+
|
|
714
|
+
- name: Test uvx deployment should NOT transform localhost URLs
|
|
715
|
+
run: |
|
|
716
|
+
echo "Testing that uvx mode does not transform localhost to gateway IP"
|
|
717
|
+
# The uvx test above should have succeeded without transformation
|
|
718
|
+
echo "✅ UVX mode correctly keeps localhost URLs unchanged"
|
|
719
|
+
|
|
720
|
+
- name: Test docker deployment with localhost URL
|
|
721
|
+
uses: ./
|
|
722
|
+
with:
|
|
723
|
+
deploy: 'docker'
|
|
724
|
+
url: '${{ steps.go-httpbin.outputs.service-url }}/get'
|
|
725
|
+
service_name: 'Docker Deployment Test'
|
|
726
|
+
expected_http_code: 200
|
|
727
|
+
retries: 3
|
|
728
|
+
initial_sleep_time: 1
|
|
729
|
+
verify_ssl: 'false'
|
|
730
|
+
debug: 'true'
|
|
731
|
+
|
|
732
|
+
- name: Test docker deployment transforms localhost URLs
|
|
733
|
+
run: |
|
|
734
|
+
echo "Docker mode should transform localhost URLs to gateway IP when in container"
|
|
735
|
+
echo "✅ Docker mode handled localhost URL transformation correctly"
|
|
736
|
+
|
|
737
|
+
- name: Derive 127.0.0.1 URL from service URL
|
|
738
|
+
id: derive-ip-url
|
|
739
|
+
run: |
|
|
740
|
+
SERVICE_URL="${{ steps.go-httpbin.outputs.service-url }}"
|
|
741
|
+
# Replace localhost with 127.0.0.1 to test IP-based access
|
|
742
|
+
IP_URL="${SERVICE_URL//localhost/127.0.0.1}"
|
|
743
|
+
echo "ip-url=${IP_URL}" >> "$GITHUB_OUTPUT"
|
|
744
|
+
echo "Derived IP URL: ${IP_URL}"
|
|
745
|
+
|
|
746
|
+
- name: Test uvx deployment with explicit 127.0.0.1
|
|
747
|
+
uses: ./
|
|
748
|
+
with:
|
|
749
|
+
deploy: 'uvx'
|
|
750
|
+
url: '${{ steps.derive-ip-url.outputs.ip-url }}/get'
|
|
751
|
+
service_name: 'UVX 127.0.0.1 Test'
|
|
752
|
+
expected_http_code: 200
|
|
753
|
+
retries: 3
|
|
754
|
+
initial_sleep_time: 1
|
|
755
|
+
verify_ssl: 'false'
|
|
756
|
+
debug: 'true'
|
|
757
|
+
|
|
758
|
+
- name: Test uvx with POST request
|
|
759
|
+
uses: ./
|
|
760
|
+
with:
|
|
761
|
+
deploy: 'uvx'
|
|
762
|
+
url: '${{ steps.go-httpbin.outputs.service-url }}/post'
|
|
763
|
+
service_name: 'UVX POST Test'
|
|
764
|
+
http_method: 'POST'
|
|
765
|
+
request_body: '{"deployment": "uvx", "test": "localhost_handling"}'
|
|
766
|
+
content_type: 'application/json'
|
|
767
|
+
expected_http_code: 200
|
|
768
|
+
verify_ssl: 'false'
|
|
769
|
+
debug: 'true'
|
|
770
|
+
|
|
771
|
+
- name: Verify both deployment modes work
|
|
772
|
+
run: |
|
|
773
|
+
echo "=== Deployment Mode Test Summary ==="
|
|
774
|
+
echo "✅ UVX mode: Works with localhost URLs (no transformation)"
|
|
775
|
+
echo "✅ Docker mode: Works with localhost URLs (transforms to gateway IP in container)"
|
|
776
|
+
echo "✅ Both modes successfully connect to Docker-mapped ports"
|
|
777
|
+
echo ""
|
|
778
|
+
echo "This test prevents regressions in localhost URL handling between deployment modes"
|
|
779
|
+
|
|
780
|
+
- name: Clean up test containers
|
|
781
|
+
if: always()
|
|
782
|
+
run: |
|
|
783
|
+
docker rm -f go-httpbin || true
|
|
784
|
+
|
|
667
785
|
# Docker integration test for PRs (using GitHub Action instead of Docker CLI)
|
|
668
786
|
docker-integration-test-pr:
|
|
669
787
|
name: 'Docker Integration Test (PR)'
|
|
@@ -677,7 +795,7 @@ jobs:
|
|
|
677
795
|
steps:
|
|
678
796
|
# Harden the runner used by this workflow
|
|
679
797
|
- name: Harden Runner
|
|
680
|
-
uses: step-security/harden-runner@
|
|
798
|
+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
681
799
|
with:
|
|
682
800
|
egress-policy: audit
|
|
683
801
|
|
|
@@ -746,7 +864,7 @@ jobs:
|
|
|
746
864
|
steps:
|
|
747
865
|
# Harden the runner used by this workflow
|
|
748
866
|
- name: Harden Runner
|
|
749
|
-
uses: step-security/harden-runner@
|
|
867
|
+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
750
868
|
with:
|
|
751
869
|
egress-policy: audit
|
|
752
870
|
|
|
@@ -816,7 +934,7 @@ jobs:
|
|
|
816
934
|
steps:
|
|
817
935
|
# Harden the runner
|
|
818
936
|
- name: Harden Runner
|
|
819
|
-
uses: step-security/harden-runner@
|
|
937
|
+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
820
938
|
with:
|
|
821
939
|
egress-policy: audit
|
|
822
940
|
|
|
@@ -44,7 +44,7 @@ jobs:
|
|
|
44
44
|
|
|
45
45
|
steps:
|
|
46
46
|
# Harden the runner used by this workflow
|
|
47
|
-
- uses: step-security/harden-runner@
|
|
47
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
48
48
|
with:
|
|
49
49
|
egress-policy: audit
|
|
50
50
|
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
|
|
47
47
|
steps:
|
|
48
48
|
# Harden the runner used by this workflow
|
|
49
|
-
- uses: step-security/harden-runner@
|
|
49
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
50
50
|
with:
|
|
51
51
|
egress-policy: audit
|
|
52
52
|
|
|
@@ -32,7 +32,7 @@ jobs:
|
|
|
32
32
|
openssf-scorecard:
|
|
33
33
|
name: "OpenSSF Scorecard"
|
|
34
34
|
# yamllint disable-line rule:line-length
|
|
35
|
-
uses: lfit/releng-reusable-workflows/.github/workflows/reuse-openssf-scorecard.yaml@
|
|
35
|
+
uses: lfit/releng-reusable-workflows/.github/workflows/reuse-openssf-scorecard.yaml@21dee35da5cf13331dad63a2c81ae5bb6d023f95 # v0.2.25
|
|
36
36
|
permissions:
|
|
37
37
|
# Needed to upload the results to code-scanning dashboard.
|
|
38
38
|
security-events: write
|
|
@@ -61,7 +61,7 @@ jobs:
|
|
|
61
61
|
steps:
|
|
62
62
|
# Harden the runner used by this workflow
|
|
63
63
|
# yamllint disable-line rule:line-length
|
|
64
|
-
- uses: step-security/harden-runner@
|
|
64
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
65
65
|
with:
|
|
66
66
|
egress-policy: 'audit'
|
|
67
67
|
|
|
@@ -40,7 +40,7 @@ jobs:
|
|
|
40
40
|
sonarqube-cloud:
|
|
41
41
|
name: "SonarQube Cloud"
|
|
42
42
|
# yamllint disable-line rule:line-length
|
|
43
|
-
uses: lfit/releng-reusable-workflows/.github/workflows/reuse-sonarqube-cloud.yaml@
|
|
43
|
+
uses: lfit/releng-reusable-workflows/.github/workflows/reuse-sonarqube-cloud.yaml@21dee35da5cf13331dad63a2c81ae5bb6d023f95 # v0.2.25
|
|
44
44
|
permissions:
|
|
45
45
|
# Needed to upload the results to code-scanning dashboard.
|
|
46
46
|
security-events: write
|
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
steps:
|
|
28
28
|
# Harden the runner used by this workflow
|
|
29
29
|
# yamllint disable-line rule:line-length
|
|
30
|
-
- uses: step-security/harden-runner@
|
|
30
|
+
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
|
31
31
|
with:
|
|
32
32
|
egress-policy: audit
|
|
33
33
|
|
|
@@ -24,6 +24,6 @@ jobs:
|
|
|
24
24
|
verify:
|
|
25
25
|
name: Check GitHub Actions
|
|
26
26
|
# yamllint disable-line rule:line-length
|
|
27
|
-
uses: lfit/releng-reusable-workflows/.github/workflows/reuse-verify-github-actions.yaml@
|
|
27
|
+
uses: lfit/releng-reusable-workflows/.github/workflows/reuse-verify-github-actions.yaml@21dee35da5cf13331dad63a2c81ae5bb6d023f95 # v0.2.25
|
|
28
28
|
permissions:
|
|
29
29
|
contents: read
|
|
@@ -52,7 +52,7 @@ repos:
|
|
|
52
52
|
args: [--config-file=.yamllint]
|
|
53
53
|
|
|
54
54
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
55
|
-
rev:
|
|
55
|
+
rev: 740a8f85dd054f284b506c33d50b4b1f0d7d20d1 # frozen: v0.14.4
|
|
56
56
|
hooks:
|
|
57
57
|
- id: ruff
|
|
58
58
|
# Currently only src and tests contain Python files
|
|
@@ -70,6 +70,15 @@ repos:
|
|
|
70
70
|
- id: mypy
|
|
71
71
|
additional_dependencies: [types-pycurl]
|
|
72
72
|
|
|
73
|
+
- repo: https://github.com/econchick/interrogate
|
|
74
|
+
rev: 1.7.0
|
|
75
|
+
hooks:
|
|
76
|
+
- id: interrogate
|
|
77
|
+
args: [--config=pyproject.toml]
|
|
78
|
+
# Currently only src contains Python files that need docstrings
|
|
79
|
+
# Tests are excluded via pyproject.toml configuration
|
|
80
|
+
files: ^src/.+\.py$
|
|
81
|
+
|
|
73
82
|
- repo: https://github.com/btford/write-good
|
|
74
83
|
rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
|
|
75
84
|
hooks:
|
|
@@ -107,7 +116,7 @@ repos:
|
|
|
107
116
|
args: ["--ignore-words=.codespell"]
|
|
108
117
|
|
|
109
118
|
- repo: https://github.com/modeseven-lfit/gha-workflow-linter
|
|
110
|
-
rev:
|
|
119
|
+
rev: 6e25590048a9b9c49d81656586dd083f47bb4f93 # frozen: v0.1.11
|
|
111
120
|
hooks:
|
|
112
121
|
- id: gha-workflow-linter
|
|
113
122
|
args: [lint, .]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: http-api-tool
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A Python HTTP/HTTPS API testing tool for GitHub Actions and CLI usage
|
|
5
5
|
Project-URL: Homepage, https://github.com/lfreleng-actions/http-api-tool-docker
|
|
6
6
|
Project-URL: Repository, https://github.com/lfreleng-actions/http-api-tool-docker
|
|
@@ -36,6 +36,7 @@ Requires-Dist: bandit>=1.8.0; extra == 'dev'
|
|
|
36
36
|
Requires-Dist: black>=24.0.0; extra == 'dev'
|
|
37
37
|
Requires-Dist: coverage[toml]>=7.9.1; extra == 'dev'
|
|
38
38
|
Requires-Dist: flake8>=7.0.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: interrogate>=1.5.0; extra == 'dev'
|
|
39
40
|
Requires-Dist: isort>=5.13.0; extra == 'dev'
|
|
40
41
|
Requires-Dist: mypy>=1.11.0; extra == 'dev'
|
|
41
42
|
Requires-Dist: pre-commit>=4.0.0; extra == 'dev'
|
|
@@ -189,6 +189,7 @@ runs:
|
|
|
189
189
|
id: uvx-run
|
|
190
190
|
shell: bash
|
|
191
191
|
env:
|
|
192
|
+
INPUT_DEPLOY: ${{ inputs.deploy }}
|
|
192
193
|
INPUT_URL: ${{ inputs.url }}
|
|
193
194
|
INPUT_AUTH_STRING: ${{ inputs.auth_string }}
|
|
194
195
|
INPUT_SERVICE_NAME: ${{ inputs.service_name }}
|
|
@@ -231,6 +232,7 @@ runs:
|
|
|
231
232
|
shell: bash
|
|
232
233
|
working-directory: ${{ github.action_path }}
|
|
233
234
|
env:
|
|
235
|
+
INPUT_DEPLOY: ${{ inputs.deploy }}
|
|
234
236
|
INPUT_URL: ${{ inputs.url }}
|
|
235
237
|
INPUT_AUTH_STRING: ${{ inputs.auth_string }}
|
|
236
238
|
INPUT_SERVICE_NAME: ${{ inputs.service_name }}
|
|
@@ -265,6 +267,7 @@ runs:
|
|
|
265
267
|
|
|
266
268
|
docker run --rm \
|
|
267
269
|
--network host \
|
|
270
|
+
-e INPUT_DEPLOY \
|
|
268
271
|
-e INPUT_URL \
|
|
269
272
|
-e INPUT_AUTH_STRING \
|
|
270
273
|
-e INPUT_SERVICE_NAME \
|
|
@@ -70,6 +70,7 @@ dev = [
|
|
|
70
70
|
"pre-commit>=4.0.0",
|
|
71
71
|
"mypy>=1.11.0",
|
|
72
72
|
"coverage[toml]>=7.9.1",
|
|
73
|
+
"interrogate>=1.5.0",
|
|
73
74
|
]
|
|
74
75
|
|
|
75
76
|
[project.urls]
|
|
@@ -159,3 +160,23 @@ ignore_missing_imports = true
|
|
|
159
160
|
[tool.bandit]
|
|
160
161
|
exclude_dirs = ["tests"]
|
|
161
162
|
skips = ["B101", "B601"]
|
|
163
|
+
|
|
164
|
+
[tool.interrogate]
|
|
165
|
+
ignore-init-method = true
|
|
166
|
+
ignore-init-module = false
|
|
167
|
+
ignore-magic = false
|
|
168
|
+
ignore-semiprivate = false
|
|
169
|
+
ignore-private = false
|
|
170
|
+
ignore-property-decorators = false
|
|
171
|
+
ignore-module = false
|
|
172
|
+
ignore-nested-functions = false
|
|
173
|
+
ignore-nested-classes = true
|
|
174
|
+
ignore-setters = false
|
|
175
|
+
fail-under = 80
|
|
176
|
+
exclude = ["setup.py", "docs", "build", "tests"]
|
|
177
|
+
ignore-regex = ["^get$", "^mock_.*", "^dummy_.*"]
|
|
178
|
+
verbose = 0
|
|
179
|
+
quiet = false
|
|
180
|
+
whitelist-regex = []
|
|
181
|
+
color = true
|
|
182
|
+
omit-covered-files = false
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '1.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (1, 0,
|
|
31
|
+
__version__ = version = '1.0.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 0, 2)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -52,9 +52,18 @@ def _get_docker_host_gateway() -> Optional[str]:
|
|
|
52
52
|
def _transform_localhost_url(url: str) -> str:
|
|
53
53
|
"""Transform localhost URLs to use Docker host gateway when running in a container."""
|
|
54
54
|
# Only transform if we're in a containerized environment (GitHub Actions)
|
|
55
|
+
# AND we're running in Docker deployment mode (not uvx on the host)
|
|
55
56
|
if not os.environ.get("GITHUB_ACTIONS"):
|
|
56
57
|
return url
|
|
57
58
|
|
|
59
|
+
# Check if we're running via uvx (on host) - in this case, don't transform
|
|
60
|
+
# uvx runs directly on the host, so localhost is correct
|
|
61
|
+
# Docker deployment runs in a container, so localhost needs to be transformed to gateway IP
|
|
62
|
+
deploy_mode = os.environ.get("INPUT_DEPLOY", "uvx")
|
|
63
|
+
if deploy_mode == "uvx":
|
|
64
|
+
# Running on host via uvx - localhost is correct, no transformation needed
|
|
65
|
+
return url
|
|
66
|
+
|
|
58
67
|
parsed = urlparse(url)
|
|
59
68
|
if parsed.hostname in ["localhost", "127.0.0.1"]:
|
|
60
69
|
gateway_ip = _get_docker_host_gateway()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|