Skip to content

No results from csharp analysis under GitHub Security #2856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Kielek opened this issue Apr 8, 2025 · 2 comments · Fixed by open-telemetry/opentelemetry-dotnet-instrumentation#4150
Assignees

Comments

@Kielek
Copy link

Kielek commented Apr 8, 2025

I am re-enabling CodeQL analysis for OpenTelemetry .NET Automatic Instrumentation. Jobs are finishing successfully with following warning Timed out waiting for analysis to finish processing. Continuing..

Based on the documentation, it might happen, but there is not GitHub results occurring under the security tab even after 3+ hours from the executions.

Image

You can find all executions under https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/workflows/codeql-analysis.yml.

The job definition is under https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/d641fa1bfac7706b101668dad611c5c537a0f7e0/.github/workflows/codeql-analysis.yml

And the debug log results with the SARIFF file: debug-artifacts-csharp.zip

Could you please advice? Help to debug the issue?

@Kielek Kielek changed the title No results from csharp analysis No results from csharp analysis unde GitHub Security Apr 8, 2025
@Kielek Kielek changed the title No results from csharp analysis unde GitHub Security No results from csharp analysis under GitHub Security Apr 8, 2025
@marcogario marcogario self-assigned this Apr 14, 2025
@aibaars
Copy link
Collaborator

aibaars commented Apr 15, 2025

Thanks for reporting.

The problem appears to be caused by missing data when comparing against the previous run, likely because the previous run is very old and alerts data has been (partially) removed.

In your case I'd recommend to update the workflow and specify an explicit "category" for uploading results. CodeScanning compares current and previous runs of the same category to determine which alerts are new or fixed. Using a new category causes CodeScanning to start from scratch.

Normally changing category is a little tricky because it would leave pre-existing alerts open. However in your case this is no problem because there are no pre-existing alerts.

This pull request should update your workflow. It was made by merging your existing workflow with the CodeQL template from https://github.com/actions/starter-workflows/blob/main/code-scanning/codeql.yml .

@Kielek
Copy link
Author

Kielek commented Apr 15, 2025

Thank you for the fixes and additional answers. I will clean-up older results later (probably tomorrow).

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 a pull request may close this issue.

3 participants