Skip to content

Conversation

mmottl
Copy link
Owner

@mmottl mmottl commented Sep 28, 2025

Potential fix for https://github.com/mmottl/postgresql-ocaml/security/code-scanning/10

To fix the problem, you need to add a permissions block either at the root of the workflow file (top-level, below name: and before jobs:) or for the individual job (under jobs.hooks). Since there is only one job, adding it at the root is cleanest and ensures minimal privileges for all jobs that do not require elevated access. The recommended minimal block is permissions: contents: read, which grants only read access to repository contents. No steps in the workflow require write access, so this is sufficient. Edit .github/workflows/pre-commit.yml by inserting the following after the name: line (line 2).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@mmottl mmottl marked this pull request as ready for review September 28, 2025 00:30
@mmottl mmottl merged commit 5d0d3d6 into main Sep 28, 2025
10 of 11 checks passed
@mmottl mmottl deleted the alert-autofix-10 branch September 28, 2025 00:46
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.

1 participant