Skip to content

Conversation

@cansavvy
Copy link
Contributor

@cansavvy cansavvy commented Apr 1, 2025

Purpose/implementation Section

What changes are being implemented in this Pull Request?

Need to carry over review from fhdsl/metricminer#99

Comment on lines +6 to +24
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper.pdf

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 30 days ago

To fix this problem, explicitly assign a permissions block to the workflow. Since this workflow does not require any write access to the repository or pull requests—its steps only involve checking out code, building a PDF, and uploading an artifact—the minimal permission required is contents: read. This restricts the GITHUB_TOKEN to only read repository contents during workflow runs. Add the following block near the top of the workflow, after the name and on fields, and before jobs. No additional methods, imports, or definitions are required.


Suggested changeset 1
.github/workflows/draft-pdf.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml
--- a/.github/workflows/draft-pdf.yml
+++ b/.github/workflows/draft-pdf.yml
@@ -1,5 +1,7 @@
 name: Draft PDF
 on: [push]
+permissions:
+  contents: read
 
 jobs:
   paper:
EOF
@@ -1,5 +1,7 @@
name: Draft PDF
on: [push]
permissions:
contents: read

jobs:
paper:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants