Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/fic-auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: fic-auth

on:
workflow_dispatch:

jobs:
who-am-i:

runs-on: ubuntu-latest

steps:
- name: Install Power Platform Tools
uses: microsoft/powerplatform-actions/actions-install@v1
with:
pac-version-override: 2.4.1
Comment on lines +9 to +15

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: {}

Copilot Autofix

AI 25 days ago

In general, the fix is to explicitly declare a permissions block for the workflow or the specific job so that GITHUB_TOKEN has only the minimal required scopes. For a simple job that just installs tooling and does not interact with repository contents, a fully read‑only or even permissions: {} configuration is usually sufficient. Since we cannot see any additional steps that might need write access, the safest non‑disruptive minimal starting point recommended by GitHub is permissions: contents: read.

The best way to fix this specific workflow without changing behavior is to add a top‑level permissions block (applies to all jobs) directly under the on: section. This avoids modifying the job structure and clearly documents the default permissions. We will add:

permissions:
  contents: read

between the on: block and the jobs: block in .github/workflows/fic-auth.yml. No imports or additional methods are needed, as this is pure YAML configuration for GitHub Actions.

Suggested changeset 1
.github/workflows/fic-auth.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/fic-auth.yml b/.github/workflows/fic-auth.yml
--- a/.github/workflows/fic-auth.yml
+++ b/.github/workflows/fic-auth.yml
@@ -3,6 +3,9 @@
 on:
   workflow_dispatch:
 
+permissions:
+  contents: read
+
 jobs:
   who-am-i:
 
EOF
@@ -3,6 +3,9 @@
on:
workflow_dispatch:

permissions:
contents: read

jobs:
who-am-i:

Copilot is powered by AI and may make mistakes. Always verify output.
Loading