mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Set other proxy env vars
This commit is contained in:
11
.github/workflows/__global-proxy.yml
generated
vendored
11
.github/workflows/__global-proxy.yml
generated
vendored
@@ -73,13 +73,22 @@ jobs:
|
|||||||
iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset
|
iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset
|
||||||
iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset
|
iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset
|
||||||
echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy"
|
echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy"
|
||||||
|
|
||||||
|
- name: Set proxy environment variables
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "http_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
echo "HTTP_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
echo "https_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
echo "HTTPS_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
env:
|
env:
|
||||||
https_proxy: http://squid-proxy:3128
|
|
||||||
CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
|
CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
|
||||||
CODEQL_ACTION_TEST_MODE: true
|
CODEQL_ACTION_TEST_MODE: true
|
||||||
container:
|
container:
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 3128:3128
|
- 3128:3128
|
||||||
env:
|
env:
|
||||||
https_proxy: http://squid-proxy:3128
|
|
||||||
CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
|
CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
|
||||||
steps:
|
steps:
|
||||||
- name: Block direct internet access to force proxy usage
|
- name: Block direct internet access to force proxy usage
|
||||||
@@ -33,8 +32,18 @@ steps:
|
|||||||
iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset
|
iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset
|
||||||
iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset
|
iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset
|
||||||
echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy"
|
echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy"
|
||||||
|
|
||||||
|
- name: Set proxy environment variables
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "http_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
echo "HTTP_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
echo "https_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
echo "HTTPS_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: ./../action/init
|
- uses: ./../action/init
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||||
|
|
||||||
- uses: ./../action/analyze
|
- uses: ./../action/analyze
|
||||||
|
|||||||
Reference in New Issue
Block a user