Skip to content

Adding Defender CLI#213

Open
omerb97 wants to merge 19 commits intomicrosoft:mainfrom
omerb97:main
Open

Adding Defender CLI#213
omerb97 wants to merge 19 commits intomicrosoft:mainfrom
omerb97:main

Conversation

@omerb97
Copy link

@omerb97 omerb97 commented Mar 18, 2026

This pull request introduces significant improvements to the GitHub Action's documentation, workflow validation, and code organization for Defender for DevOps. The changes include new self-hosted validation workflows for both v1 and v2, a comprehensive documentation file for contributors, updates to the action's entry points, and the addition of a new container-mapping implementation for v2. These updates enhance clarity, maintainability, and support for advanced scanning scenarios.

Documentation enhancements:

  • Added .github/copilot-instructions.md with build, test, architecture, and conventions for contributors, improving onboarding and maintenance.

Workflow validation improvements:

  • Added .github/workflows/self-hosted-validation-v1.yml for MSDO v1 self-hosted security scan validation.
  • Added .github/workflows/self-hosted-validation-v2.yml for Defender CLI v2 self-hosted image, model, and filesystem scan validation.

Codebase and entry point updates:

  • Updated action.yml to reference lib/v1/main.js, lib/v1/pre.js, and lib/v1/post.js as entry points, supporting clearer version separation.

New functionality:

  • Added lib/v2/container-mapping.js, implementing the v2 container mapping logic for pre/post job Docker event/image collection and reporting to Defender for DevOps.

Omer Bareket and others added 15 commits March 15, 2026 16:50
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add v2 Defender CLI implementation (filesystem, image, model scans)
- Restructure src/ and lib/ into v1/ and v2/ folders
- Port defender-client and defender-installer from AzDevOps task-lib
- Add job summary with SARIF parsing for GitHub Actions
- Add self-hosted validation workflow for image scan testing
- Add 70 new tests for v2 components

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eme)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Revert action.yml to v1 MSDO inputs (paths updated to lib/v1/)
- Create v2/action.yml for Defender CLI v2
- Split self-hosted-validation into v1 and v2 workflows
- v1 workflow uses ./ (root action.yml)
- v2 workflow uses ./v2/ (v2 action.yml)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Policy variations: github, microsoft, none, azuredevops, mdc
- Break on critical: image (vuln), model (vuln), fs
- Debug logging: image with debug=true
- PR summary toggle: image with pr-summary=false
- Custom args: image with --defender-list-findings
- Different images: nginx, pycontribs/ubuntu (vulnerable)
- Defaults only: no inputs (verify all defaults)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@omerb97 omerb97 requested a review from a team as a code owner March 18, 2026 13:15
Omer Bareket and others added 2 commits March 19, 2026 10:17
Signed-off-by: Omer Bareket <34472645+omerb97@users.noreply.github.com>
@omerb97
Copy link
Author

omerb97 commented Mar 19, 2026

@microsoft-github-policy-service agree company="Microsoft"

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