Skip to content

Commit c65a81b

Browse files
gl0bal01claude
andcommitted
fix(security): harden .gitignore, pin actions, fix CI injection risk
- .gitignore: replace specific .env.* entries with .env.* glob + !.env.example - .env.example: fix nuclei template path from /root/ to /opt/ - mirror.yml: pin actions/checkout to SHA - update-doi.yml: pin actions/checkout to SHA, fix command injection risk by moving github.event.release.tag_name to env var instead of inline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 687dbc8 commit c65a81b

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ EXIFTOOL_PATH=exiftool
3131
SHERLOCK_PATH=sherlock
3232
MAIGRET_PATH=maigret
3333
NUCLEI_PATH=nuclei
34-
NUCLEI_TEMPLATE_PATH=/root/nuclei-templates/http/osint/user-enumeration
34+
NUCLEI_TEMPLATE_PATH=/opt/nuclei-templates/http/osint/user-enumeration
3535

3636
# JWT Tool
3737
JWT_TOOL_PATH=/opt/tools/jwt_tool

.github/workflows/mirror.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
codeberg:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1313
with:
1414
fetch-depth: 0
1515
- name: Configure Git

.github/workflows/update-doi.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,26 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616
with:
1717
token: ${{ secrets.GITHUB_TOKEN }}
1818

1919
- name: Wait for Zenodo processing
2020
run: sleep 300
2121

2222
- name: Update CITATION.cff
23+
env:
24+
TAG_NAME: ${{ github.event.release.tag_name }}
2325
run: |
24-
sed -i "s/^version:.*/version: ${{ github.event.release.tag_name }}/" CITATION.cff
26+
sed -i "s/^version:.*/version: $TAG_NAME/" CITATION.cff
2527
sed -i "s/^date-released:.*/date-released: $(date +%Y-%m-%d)/" CITATION.cff
2628
2729
- name: Commit changes
30+
env:
31+
TAG_NAME: ${{ github.event.release.tag_name }}
2832
run: |
2933
git config --local user.name "GitHub Action"
3034
git config --local user.email "action@github.com"
3135
git add CITATION.cff
32-
git commit -m "Update citation info for ${{ github.event.release.tag_name }}" || exit 0
36+
git commit -m "Update citation info for $TAG_NAME" || exit 0
3337
git push

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ yarn.lock
77

88
# Environment variables and configuration
99
.env
10-
.env.local
11-
.env.development.local
12-
.env.test.local
13-
.env.production.local
10+
.env.*
11+
!.env.example
1412
config.json
1513

1614
# Temporary files and directories

0 commit comments

Comments
 (0)