Skip to content

Modify CodeQL workflow for main and development branches#83

Merged
jldsilva merged 2 commits into
mainfrom
codeql-advanced-file
Apr 1, 2026
Merged

Modify CodeQL workflow for main and development branches#83
jldsilva merged 2 commits into
mainfrom
codeql-advanced-file

Conversation

@jldsilva

@jldsilva jldsilva commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Updated CodeQL workflow to support development branch and upgraded actions.

Summary by CodeRabbit

Chores

  • Adicionada análise automática de segurança que executa verificações em commits, pull requests e de forma agendada (semanal), com variação por linguagem.

Updated CodeQL workflow to support development branch and upgraded actions.
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 487f44db-27a4-4399-89dc-ad9ca290a018

📥 Commits

Reviewing files that changed from the base of the PR and between 9089526 and 6ddfde8.

📒 Files selected for processing (1)
  • .github/workflows/codeql.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/codeql.yml

Walkthrough

Um novo workflow do GitHub Actions foi adicionado em .github/workflows/codeql.yml para executar análises CodeQL. O workflow dispara em push e pull_request nas branches main e development, além de um agendamento semanal, e usa uma matriz de linguagens (actions, csharp) com build-mode: none.

Changes

Cohort / File(s) Summary
GitHub Actions — CodeQL workflow
.github/workflows/codeql.yml
Adiciona workflow "CodeQL Advanced" que configura permissões de menor privilégio, usa github/codeql-action/init@v4 e github/codeql-action/analyze@v4, matriz de linguagens (actions, csharp) com build-mode: none, escolha de runner (macOS para swift, senão Ubuntu), e passo opcional de falha de build manual quando build-mode é manual. Dispara em push, pull_request (branches main, development) e cron semanal.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutos

Poem

🐰 Eu, coelho curioso, venho saltitar,
CodeQL no baile para o código olhar,
Actions e C# a dançar na pista,
Caçando bugs com pulos de artista,
Segurança e alegria no nosso lar. 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed O título refere-se a uma parte real da alteração (modificação do workflow CodeQL para branches main e development), mas não captura completamente a mudança principal, que é a adição de um novo workflow CodeQL Advanced com suporte a múltiplas linguagens e atualização para v4.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codeql-advanced-file

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/codeql.yml (1)

30-30: Condicional para Swift não utilizado.

A expressão matrix.language == 'swift' nunca será verdadeira, pois swift não está na matriz de linguagens. Isso é código morto inofensivo, mas pode ser removido para maior clareza.

♻️ Sugestão de simplificação
-    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
+    runs-on: ubuntu-latest
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/codeql.yml at line 30, Remova o ramo morto da expressão
runs-on: substitua a expressão condicional complexa que usa matrix.language ==
'swift' por um valor simples (por exemplo 'ubuntu-latest') ou ajuste a matriz de
linguagens para incluir 'swift' se a intenção for suportar macOS; localize a
expressão runs-on no workflow (a linha contendo runs-on: ${{ (matrix.language ==
'swift' && 'macos-latest') || 'ubuntu-latest' }}) e simplifique para manter
apenas o caminho desejado.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/codeql.yml:
- Around line 59-73: O workflow usa a ação github/codeql-action/init@v5 (não
existente); substitua a referência github/codeql-action/init@v5 por a tag
principal suportada (por exemplo github/codeql-action/init@v4 ou uma versão
pontual como github/codeql-action/init@v4.35.1) para garantir compatibilidade;
mantenha o bloco com as entradas languages: ${{ matrix.language }} e build-mode:
${{ matrix.build-mode }} inalterados e verifique outras ocorrências de
github/codeql-action no arquivo para aplicar a mesma correção se houver.

---

Nitpick comments:
In @.github/workflows/codeql.yml:
- Line 30: Remova o ramo morto da expressão runs-on: substitua a expressão
condicional complexa que usa matrix.language == 'swift' por um valor simples
(por exemplo 'ubuntu-latest') ou ajuste a matriz de linguagens para incluir
'swift' se a intenção for suportar macOS; localize a expressão runs-on no
workflow (a linha contendo runs-on: ${{ (matrix.language == 'swift' &&
'macos-latest') || 'ubuntu-latest' }}) e simplifique para manter apenas o
caminho desejado.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a710e379-3676-4b19-bded-f4f045daa74c

📥 Commits

Reviewing files that changed from the base of the PR and between f3336de and 9089526.

📒 Files selected for processing (1)
  • .github/workflows/codeql.yml

Comment thread .github/workflows/codeql.yml
@jldsilva jldsilva merged commit 378c259 into main Apr 1, 2026
8 of 11 checks passed
@jldsilva jldsilva deleted the codeql-advanced-file branch April 1, 2026 22:21
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