Skip to content

Commit 5665f9a

Browse files
chore: pin actions to SHA, fix permissions, add scorecard badge (#254)
Agent-Logs-Url: https://github.com/fabiocaccamo/python-codicefiscale/sessions/a1fba745-54b5-4029-9cfb-18b9b4bf0df6 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fabiocaccamo <1035294+fabiocaccamo@users.noreply.github.com>
1 parent e160f37 commit 5665f9a

5 files changed

Lines changed: 26 additions & 20 deletions

File tree

.github/workflows/create-release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Create release
22

3+
permissions: {}
4+
35
on:
46
push:
57
tags:
@@ -10,24 +12,25 @@ jobs:
1012
runs-on: ubuntu-latest
1113
# environment: release
1214
permissions:
15+
contents: write
1316
id-token: write
1417

1518
steps:
1619
- name: Checkout
17-
uses: actions/checkout@v6
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1821

1922
- name: Extract release notes
2023
id: extract-release-notes
21-
uses: ffurrer2/extract-release-notes@v3
24+
uses: ffurrer2/extract-release-notes@273da39a24fb7db106a35526c8162815faffd31d # v3.1.0
2225

2326
- name: Create release
24-
uses: ncipollo/release-action@v1
27+
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
2528
with:
2629
body: ${{ steps.extract-release-notes.outputs.release_notes }}
2730
token: ${{ secrets.WORKFLOWS_CREATE_RELEASE_TOKEN }}
2831

2932
- name: Set up Python
30-
uses: actions/setup-python@v6
33+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3134
with:
3235
python-version: '3.x'
3336
cache: 'pip'
@@ -39,7 +42,7 @@ jobs:
3942
python -m build
4043
4144
- name: Publish on PyPI
42-
uses: pypa/gh-action-pypi-publish@release/v1
45+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
4346
with:
4447
packages-dir: dist/
4548
# password: ${{ secrets.WORKFLOWS_PUBLISH_TO_PYPI_TOKEN }}

.github/workflows/pre-commit-autoupdate.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Pre-commit auto-update
22

3-
permissions:
4-
contents: write
5-
pull-requests: write
3+
permissions: {}
64

75
on:
86
# every month
@@ -14,13 +12,16 @@ on:
1412
jobs:
1513
auto-update:
1614
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
pull-requests: write
1718
steps:
18-
- uses: actions/checkout@v6
19-
- uses: actions/setup-python@v6
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2021
with:
2122
python-version: '3.x'
22-
- uses: browniebroke/pre-commit-autoupdate-action@main
23-
- uses: peter-evans/create-pull-request@v8
23+
- uses: browniebroke/pre-commit-autoupdate-action@f5c3ec85103b9f8f9be60b9c006cec763d2bdd02 # v1.0.1
24+
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
2425
with:
2526
token: ${{ secrets.GITHUB_TOKEN }}
2627
branch: update/pre-commit-hooks

.github/workflows/test-package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323

2424
steps:
2525

26-
- uses: actions/checkout@v6
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727

2828
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v6
29+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232
cache: 'pip'
@@ -51,7 +51,7 @@ jobs:
5151
pytest tests --cov=codicefiscale --cov-report=term-missing --cov-fail-under=90
5252
5353
- name: Upload coverage to Codecov
54-
uses: codecov/codecov-action@v6
54+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
5555
with:
5656
token: ${{ secrets.CODECOV_TOKEN }}
5757
fail_ci_if_error: false

.github/workflows/update-data.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Update data
22

3-
permissions:
4-
contents: write
3+
permissions: {}
54

65
on:
76
workflow_dispatch:
@@ -12,11 +11,13 @@ jobs:
1211
resources:
1312
name: Update resources
1413
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1516
steps:
16-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1718

1819
- name: Set up Python
19-
uses: actions/setup-python@v6
20+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2021
with:
2122
python-version: '3.x'
2223

@@ -37,7 +38,7 @@ jobs:
3738
pre-commit run --files src/codicefiscale/data/countries.json src/codicefiscale/data/municipalities.json
3839
3940
- name: Commit data
40-
uses: test-room-7/action-update-file@v2
41+
uses: test-room-7/action-update-file@be6fb6d9c59d5ec4b56542f2e8ad2516a99e3402 # v2.0.0
4142
with:
4243
file-path: |
4344
src/codicefiscale/data/countries.json

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
[![](https://img.shields.io/scrutinizer/quality/g/fabiocaccamo/python-codicefiscale?logo=scrutinizer)](https://scrutinizer-ci.com/g/fabiocaccamo/python-codicefiscale/?branch=main)
1212
[![](https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=black)](https://github.com/psf/black)
1313
[![](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
14+
[![](https://api.securityscorecards.dev/projects/github.com/fabiocaccamo/python-codicefiscale/badge)](https://securityscorecards.dev/viewer/?uri=github.com/fabiocaccamo/python-codicefiscale)
1415

1516
# python-codicefiscale
1617
python-codicefiscale is a library for encode/decode Italian fiscal code - **codifica/decodifica del Codice Fiscale**.

0 commit comments

Comments
 (0)