Skip to content

Conversation

ihrpr
Copy link
Contributor

@ihrpr ihrpr commented Oct 2, 2025

Run prettier after #976

@ihrpr ihrpr requested review from a team, ochafik and felixweinberger October 2, 2025 17:13
Comment on lines +15 to +29
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- run: npm ci
- run: npm run build
- run: npm test
- run: npm run lint

publish:

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 4 days ago

To fix this problem, add a minimal permissions block to the build job in the .github/workflows/main.yml file, restricting the GITHUB_TOKEN permissions for that job to only what is required. Based on the steps in the build job, no operations require write access to repository contents, so setting contents: read will adhere to the principle of least privilege. Add the following block under the build: job definition before the runs-on: line:

permissions:
  contents: read

No imports or additional method definitions are required. Only the YAML job configuration needs to be updated.

Suggested changeset 1
.github/workflows/main.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/main.yml b/.github/workflows/main.yml
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -12,6 +12,8 @@
 
 jobs:
     build:
+        permissions:
+            contents: read
         runs-on: ubuntu-latest
 
         steps:
EOF
@@ -12,6 +12,8 @@

jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest

steps:
Copilot is powered by AI and may make mistakes. Always verify output.
}));
app.use(
cors({
origin: '*', // Allow all origins - adjust as needed for production

Check warning

Code scanning / CodeQL

Permissive CORS configuration Medium

CORS Origin allows broad access due to
permissive or user controlled value
.
@ihrpr ihrpr closed this Oct 2, 2025
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