File tree Expand file tree Collapse file tree 6 files changed +19
-0
lines changed
Expand file tree Collapse file tree 6 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 2727 steps :
2828 - name : Checkout code
2929 uses : actions/checkout@v5.0.0
30+ with :
31+ persist-credentials : false
3032
3133 - name : Set up Python
3234 uses : actions/setup-python@v5.6.0
Original file line number Diff line number Diff line change 1515 runs-on : ubuntu-latest
1616 steps :
1717 - uses : actions/checkout@v5.0.0
18+ with :
19+ persist-credentials : false
1820 - name : Build the Docker image
1921 run : docker build . --file Dockerfile --platform linux/amd64
Original file line number Diff line number Diff line change 2121 python-version : [3.11, 3.12]
2222 steps :
2323 - uses : actions/checkout@v5.0.0
24+ with :
25+ persist-credentials : false
2426 - name : Set up Python ${{ matrix.python-version }}
2527 uses : actions/setup-python@v5.6.0
2628 with :
Original file line number Diff line number Diff line change 2121 uses : actions/checkout@v5.0.0
2222 with :
2323 fetch-depth : 0
24+ persist-credentials : false
2425 - name : Install dependencies
2526 run : |
2627 python -m pip install --upgrade pip
Original file line number Diff line number Diff line change 1+ rules :
2+ dangerous-triggers : # to allow pull_request_target for auto-labelling fork pull requests
3+ disable : true
Original file line number Diff line number Diff line change @@ -19,6 +19,15 @@ RUN python3 -m pip install --no-cache-dir -r requirements.txt \
1919 && apt-get -y update \
2020 && apt-get -y install --no-install-recommends git=1:2.47.3-0+deb13u1 \
2121 && rm -rf /var/lib/apt/lists/*
22+ && adduser --system --ingroup appuser --home /action/workspace --disabled-login appuser \
23+ && chown -R appuser:appuser /action/workspace
24+
25+ # Run the action as a non-root user
26+ USER appuser
27+
28+ # Add a simple healthcheck to satisfy container scanners
29+ HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
30+ CMD python3 -c "import os,sys; sys.exit(0 if os.path.exists('/action/workspace/contributors.py') else 1)"
2231
2332CMD ["/action/workspace/contributors.py" ]
2433ENTRYPOINT ["python3" , "-u" ]
You can’t perform that action at this time.
0 commit comments