Skip to content

Ensure the official build files CodeQL issues - #24278

Merged
Travis Plunk (TravisEz13) merged 10 commits into
PowerShell:masterfrom
TravisEz13:enableCodeQL-TSA
Sep 12, 2024
Merged

Ensure the official build files CodeQL issues#24278
Travis Plunk (TravisEz13) merged 10 commits into
PowerShell:masterfrom
TravisEz13:enableCodeQL-TSA

Conversation

@TravisEz13

@TravisEz13 Travis Plunk (TravisEz13) commented Sep 11, 2024

Copy link
Copy Markdown
Member

PR Summary

This pull request includes several changes to enhance the configuration and pipeline scripts, primarily focusing on enabling CodeQL analysis conditionally based on the branch and improving the organization of the configuration files.

Configuration Enhancements:

  • Codebase Name Addition:
    • Added codebaseName to .config/tsaoptions.json to specify the name of the codebase. ([.config/tsaoptions.jsonR2](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-5087085f56036da072ca64127f12fef07158982e2572f4e072dfce97bba799e2R2))

Pipeline Script Improvements:

  • Conditional CodeQL Enablement:

    • Added a new variable CODEQL_ENABLED in .pipelines/PowerShell-Coordinated_Packages-Official.yml to conditionally enable CodeQL based on the branch. ([.pipelines/PowerShell-Coordinated_Packages-Official.ymlR77-R82](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-b4a2090e3664c911fbfe10b93d8703cba9141cabb8707085b1b6885a4ee8653aR77-R82))
    • Updated the codeql section in .pipelines/PowerShell-Coordinated_Packages-Official.yml to use the new CODEQL_ENABLED variable. ([.pipelines/PowerShell-Coordinated_Packages-Official.ymlR100-R103](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-b4a2090e3664c911fbfe10b93d8703cba9141cabb8707085b1b6885a4ee8653aR100-R103))
  • Linux Pipeline Adjustments:

    • Disabled auto-injected CodeQL enablement and added manual control in .pipelines/templates/linux.yml. ([.pipelines/templates/linux.ymlL36-R38](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-d57c933d863854f9d912e16e721ee4f97370454f265d73be75d62448be712056L36-R38))
    • Updated conditions for CodeQL3000Init and CodeQL3000Finalize tasks to use CODEQL_ENABLED variable in .pipelines/templates/linux.yml. ([[1]](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-d57c933d863854f9d912e16e721ee4f97370454f265d73be75d62448be712056L57-R64), [[2]](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-d57c933d863854f9d912e16e721ee4f97370454f265d73be75d62448be712056L113-R115))
  • Windows Pipeline Adjustments:

    • Disabled auto-injected CodeQL enablement and added manual control in .pipelines/templates/windows-hosted-build.yml. ([.pipelines/templates/windows-hosted-build.ymlL37-R39](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-75adb3400c53c5cbe183c86d9d543a4cda81cd7664b45c4bf3ce77478e8ff098L37-R39))
    • Updated conditions for CodeQL3000Init and CodeQL3000Finalize tasks to use CODEQL_ENABLED variable in .pipelines/templates/windows-hosted-build.yml. ([[1]](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-75adb3400c53c5cbe183c86d9d543a4cda81cd7664b45c4bf3ce77478e8ff098L58-R65), [[2]](https://github.com/PowerShell/PowerShell/pull/24278/files#diff-75adb3400c53c5cbe183c86d9d543a4cda81cd7664b45c4bf3ce77478e8ff098L187-R189))

PR Context

PR Checklist

@TravisEz13 Travis Plunk (TravisEz13) changed the title Enable and disable CodeQL in the right places during the official build Ensure the official build files CodeQL issues Sep 11, 2024
Comment thread .pipelines/PowerShell-Coordinated_Packages-Official.yml
Comment thread .pipelines/PowerShell-Coordinated_Packages-Official.yml Outdated
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

📣 Hey Travis Plunk (@TravisEz13), how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@max09000-tec george (max09000-tec) 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.

@jshigetomi Justin Chung (jshigetomi) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Dec 12, 2024
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
* Enable and Disable CodeQL in the right places during the official build

* fix codeql condition

* fix syntax error

* Enable codeQL issue filing

* use parameter instead of branch to force codeql

* try to name the build better

* Update .pipelines/PowerShell-Coordinated_Packages-Official.yml

* add debugging to display name of debugging parameters

* fix spacing

* Update .pipelines/PowerShell-Coordinated_Packages-Official.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants