Skip to content

Example of using FIC/OIDC flow#46

Merged
petrochuk merged 1 commit intomainfrom
users/anpetroc/oidc_example
Mar 24, 2026
Merged

Example of using FIC/OIDC flow#46
petrochuk merged 1 commit intomainfrom
users/anpetroc/oidc_example

Conversation

@petrochuk
Copy link
Copy Markdown
Contributor

No description provided.

@petrochuk petrochuk merged commit 695786e into main Mar 24, 2026
2 of 3 checks passed
Comment on lines +9 to +15
runs-on: ubuntu-latest

steps:
- name: Install Power Platform Tools
uses: microsoft/powerplatform-actions/actions-install@v1
with:
pac-version-override: 2.4.1 No newline at end of file

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.
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.

3 participants