Skip to content

Conversation

@TimothyMothra
Copy link
Contributor

@TimothyMothra TimothyMothra commented May 1, 2025

This change adds C++ to the CodeQL workflow.

This task creates a temporary file that is used to compile each of the C++ files.

This step passes when running as part of the PR. I need it to run on the main branch to test if it resolves our CodeQL compliance.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@TimothyMothra
Copy link
Contributor Author

It's the end of the day on Thursday. CodeQL passed for C++ for the first time.
I worked with Copilot to make these changes, it recommended a LOT of changes. I need more time to review and understand these changes.

I'm off tomorrow (Friday) and I'll be back on Monday. I'll pick this up next week and continue my investigation.

Comment on lines 87 to 90
# Explicitly define which C++ file we're interested in
$sourceDir = "etw/native/src/main/cpp"
$headerDir = "etw/native/src/main/headers"
$cppFile = "$sourceDir/etw_provider.cpp"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the C++ files in this repo exist in this directory:
https://github.com/microsoft/ApplicationInsights-Java/tree/main/etw/native/src/main

@TimothyMothra TimothyMothra marked this pull request as ready for review May 9, 2025 21:48
@TimothyMothra TimothyMothra changed the title [WIP] testing fixes for CodeQL testing fixes for CodeQL May 9, 2025
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

maybe worth adding a conmm

languages: cpp
debug: true

- name: Build C++ code
Copy link
Member

Choose a reason for hiding this comment

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

maybe worth adding a comment here about why the normal compilation of C++ code that we do via gradle doesn't get picked up by codeql?

@TimothyMothra TimothyMothra enabled auto-merge (squash) May 12, 2025 20:41
@TimothyMothra TimothyMothra merged commit d7f8764 into main May 12, 2025
95 checks passed
@TimothyMothra TimothyMothra deleted the tilee/202505_testingCodeQLfix branch May 12, 2025 21:07
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.

3 participants