Skip to content

Conversation

@flexai-bot
Copy link
Contributor

@flexai-bot flexai-bot commented Sep 8, 2025

This installs a workflow that will check if the repo complies with the FlexAI standards.

This only applies to internal repos. If you see this PR in a forked repo, please contact the Infra team and ask an exemption for this repo.

This PR has been created by: https://github.com/flexaihq/infra/actions/runs/17551670037

Refs: SEC-20

@flexai-bot flexai-bot requested a review from a team as a code owner September 8, 2025 08:39

jobs:
check:
uses: flexaihq/actions/.github/workflows/repo-compliance-workflow.yaml@main

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 2 months ago

To fix this problem, we need to explicitly set a permissions block in .github/workflows/repo-compliance.yaml. The safest minimal permissions are generally contents: read, unless more is needed (for example, if the workflow writes to issues or PRs, issues: write or pull-requests: write should be added). Since the workflow is invoking a reusable compliance workflow, and we aren't given any evidence that write permissions are necessary, we should start with the minimum: contents: read. The block should be placed at the top level (directly below name: and before on:) or inside the specific job definition. Best practice is to apply it at the root unless individual jobs need differing permissions. No new imports or definitions are needed—just the YAML permissions key.

Suggested changeset 1
.github/workflows/repo-compliance.yaml

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/repo-compliance.yaml b/.github/workflows/repo-compliance.yaml
--- a/.github/workflows/repo-compliance.yaml
+++ b/.github/workflows/repo-compliance.yaml
@@ -1,4 +1,6 @@
 name: Check Repo Compliance
+permissions:
+  contents: read
 on:
   pull_request:
     branches:
EOF
@@ -1,4 +1,6 @@
name: Check Repo Compliance
permissions:
contents: read
on:
pull_request:
branches:
Copilot is powered by AI and may make mistakes. Always verify output.
@flexai-bot flexai-bot force-pushed the create-pull-request/patch branch from 0ad64c6 to a919145 Compare September 8, 2025 13:02
@robin-thoni robin-thoni closed this Sep 8, 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.

3 participants