Fix OSSAR workflow: restore valid YAML, add MSDO integration, drop pull_request trigger#82
Merged
Conversation
…quest trigger Co-authored-by: JMG3000 <105582814+JMG3000@users.noreply.github.com> Agent-Logs-Url: https://github.com/codingUnited/MokseWebsite/sessions/21d1b28d-71d5-4b71-8986-fc3007c9aaff
Copilot
AI
changed the title
[WIP] Add OSSAR workflow for static analysis
Fix OSSAR workflow: restore valid YAML, add MSDO integration, drop pull_request trigger
Mar 26, 2026
JMG3000
approved these changes
Mar 26, 2026
Contributor
JMG3000
left a comment
There was a problem hiding this comment.
Review
All changes have been reviewed and approved based on the risk assessed.
Status:
Approved
Contributor
There was a problem hiding this comment.
Pull request overview
Repairs the broken OSSAR GitHub Actions workflow so code scanning can run successfully again on trusted contexts (push + schedule), and adds Microsoft Security DevOps (MSDO) scanning with SARIF upload.
Changes:
- Restores valid workflow structure by adding the missing
jobs:block and placingenv:/steps:at the correct scope. - Adds MSDO scanning and uploads its SARIF results when produced.
- Removes the
pull_requesttrigger and grantssecurity-events: write; pins all referenced actions to commit SHAs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The OSSAR workflow was missing its
jobs:block entirely (rendering it invalid YAML that would never run), lacked the Microsoft Security DevOps CLI step despite the PR description claiming otherwise, and included apull_requesttrigger that causes SARIF upload failures on fork PRs due to read-onlyGITHUB_TOKEN.Changes
jobs: OSSAR-Scan:withruns-on: windows-latest; movedenv:to job scope; properly indented all stepsmicrosoft/security-devops-action@08976cb6(v1.12.0) withcontinue-on-error: trueand a dedicated conditional SARIF upload steppull_requesttrigger — SARIF upload viaupload-sarifrequiressecurity-events: write, which is unavailable on fork PR contexts; workflow now triggers onpushtomasterand weeklyscheduleonlysecurity-events: writepermission — explicitly granted at workflow level, required forupload-sarifactions/checkout,github/ossar-action,microsoft/security-devops-action, andgithub/codeql-action/upload-sarifall pinned to full commit SHAs📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.