Skip to content

Commit ef5b328

Browse files
committed
CI: auto-fix via zizmor
May include: - Avoids risky string interpolation. - Prevents checkout premissions from leaking
1 parent 821ae41 commit ef5b328

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/mplfinance_checks.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@ jobs:
1111
run: |
1212
echo "The job was automatically triggered by a ${{ github.event_name }} event."
1313
echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
14-
echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
14+
echo "The name of your branch is ${GITHUB_REF} and your repository is ${{ github.repository }}."
1515
echo " "
16-
echo "github.ref = ${{ github.ref }}"
16+
echo "github.ref = ${GITHUB_REF}"
1717
echo "github.sha = ${{ github.sha }}"
18-
echo "github.event.pull_request.head.ref = ${{ github.event.pull_request.head.ref }}"
18+
echo "github.event.pull_request.head.ref = ${GITHUB_EVENT_PULL_REQUEST_HEAD_REF}"
1919
echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}"
20-
echo "github.event.pull_request.base.ref = ${{ github.event.pull_request.base.ref }}"
20+
echo "github.event.pull_request.base.ref = ${GITHUB_EVENT_PULL_REQUEST_BASE_REF}"
2121
echo "github.event.pull_request.base.sha = ${{ github.event.pull_request.base.sha }}"
2222
echo " "
23+
env:
24+
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: ${{ github.event.pull_request.head.ref }}
25+
GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
2326

2427
- name: Check out repository code
2528
uses: actions/checkout@v2
29+
with:
30+
persist-credentials: false
2631

2732
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
2833

@@ -43,14 +48,18 @@ jobs:
4348
- name: Run Pytest
4449
run: python -m pytest
4550

46-
- run: echo "This job's status is ${{ job.status }}."
51+
- run: echo "This job's status is ${JOB_STATUS}."
52+
env:
53+
JOB_STATUS: ${{ job.status }}
4754

4855
Pull_Request_Updates_Version:
4956
runs-on: ubuntu-20.04
5057
if: github.event_name == 'pull_request'
5158
steps:
5259
- name: Check out repository code
5360
uses: actions/checkout@v2
61+
with:
62+
persist-credentials: false
5463

5564
- name: Set up Python ${{ matrix.python-version }}
5665
uses: actions/setup-python@v2

.github/workflows/pubPyPI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
- name: Checkout Repository
1616
uses: actions/checkout@v3
1717
with:
18-
ref: ${{ github.event.inputs.tag }}
18+
ref: ${{ github.event.inputs.tag }}
19+
persist-credentials: false
1920

2021
- name: Display Coded Version
2122
#run: git show ${{ github.sha }}:src/mplfinance/_version.py

.github/workflows/pubTestPyPI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
- name: Checkout Repository
1616
uses: actions/checkout@v3
1717
with:
18-
ref: ${{ github.event.inputs.tag }}
18+
ref: ${{ github.event.inputs.tag }}
19+
persist-credentials: false
1920

2021
- name: Display Coded Version
2122
#run: git show ${{ github.sha }}:src/mplfinance/_version.py

0 commit comments

Comments
 (0)