Skip to content

Conversation

@fcarrero
Copy link
Collaborator

Potential fix for https://github.com/conekta/openapi/security/code-scanning/2

In general, to fix this issue you explicitly declare minimal GITHUB_TOKEN permissions either at the workflow root or for the specific job. This overrides any potentially over‑permissive repository/organization defaults and adheres to the principle of least privilege.

For this specific workflow, the safest and simplest fix without changing existing functionality is to add a permissions: block granting only read access to repository contents. The rdme-openapi job only checks out the repository (actions/checkout@v3) and then calls readmeio/rdme@v8 with an API key secret; it does not create releases, modify issues, or push commits, so contents: read is sufficient. We will add permissions: contents: read under the rdme-openapi job definition, aligned with runs-on:. This change is in .github/workflows/rdme-openapi.yml, near line 17.

No additional imports or methods are needed; this is purely a YAML configuration change.

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

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@fcarrero fcarrero marked this pull request as ready for review December 19, 2025 19:25
@fcarrero fcarrero merged commit b623283 into main Dec 19, 2025
5 of 6 checks passed
@fcarrero fcarrero deleted the alert-autofix-2 branch December 19, 2025 19:25
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.

2 participants