Commit 1f7950b
Potential fix for code scanning alert no. 1: Workflow does not contain permissions (#3)
Potential fix for
[https://github.com/capire/xflights-java/security/code-scanning/1](https://github.com/capire/xflights-java/security/code-scanning/1)
To fix this issue, add a minimal explicit `permissions` block at the top
level of the workflow YAML file (`.github/workflows/maven.yml`), before
the `jobs:` section. Since this workflow only checks out code and builds
with Maven (reads source, runs tests, does not push, open issues, etc.),
it suffices to grant only `contents: read`. This restricts the
`GITHUB_TOKEN` to the least privilege needed and avoids unintended write
access. You do not need to modify existing `jobs` or `steps`. Ensure the
block uses correct YAML indentation.
---
_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>1 parent 8179c4c commit 1f7950b
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
0 commit comments