-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[ci] Enable api scan on dnceng #30984
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e7e0891
[ci] List dlls
rmarinho e2e3618
Fix steps
rmarinho ff48151
Again
rmarinho c0689eb
Again
rmarinho 9f17f5a
yml
rmarinho 131128e
Execute post steps
rmarinho 1333821
Try run apiscan
rmarinho 097a0b9
Try add ids
rmarinho 9b3ab85
TRY AGAIN
rmarinho 6f068e3
Try 1ES tasks
rmarinho cf43f9b
Fxi ident
rmarinho a9904dd
Remove publish
rmarinho e0d0641
Try template context
rmarinho f39f9f9
isProduction
rmarinho c59588e
try outputs
rmarinho 9e48826
not release job
rmarinho 2de4c5d
Fix artifact name
rmarinho 566767a
Try again fix variables
rmarinho 5785b8b
Try push metadat files
rmarinho 3f386f5
Try hardcode
rmarinho 891af83
Try again
rmarinho b3f2261
Update variables
rmarinho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Template for APIScan stage | ||
|
|
||
| parameters: | ||
| - name: prepareSteps | ||
| type: stepList | ||
| default: [] | ||
| - name: postSteps | ||
| type: stepList | ||
| default: [] | ||
| - name: pool | ||
| type: object | ||
| - name: dependsOnStage | ||
| type: object | ||
| default: [] | ||
| - name: softwareName | ||
| type: string | ||
| default: 'MAUI' | ||
| - name: softwareVersion | ||
| type: string | ||
| default: '9.0' | ||
| - name: softwareBuildNum | ||
| type: string | ||
| default: '$(Build.BuildId)' | ||
| - name: softwareFolder | ||
| type: string | ||
| default: '$(Agent.TempDirectory)/APIScanFiles' | ||
| - name: AppId | ||
| type: string | ||
| default: $(ApiScanAppId) | ||
| - name: TenantId | ||
| type: string | ||
| default: $(ApiScanTenantId) | ||
| - name: ServiceConnectionId | ||
| type: string | ||
| default: $(ApiScanServiceConnectionId) | ||
|
|
||
| stages: | ||
| - stage: APIScan | ||
| displayName: Run APIScan | ||
| dependsOn: ${{ parameters.dependsOnStage }} | ||
| jobs: | ||
| - job: api_scan | ||
| displayName: APIScan Job | ||
| pool: ${{ parameters.pool }} | ||
| templateContext: | ||
| type: releaseJob | ||
| isProduction: true | ||
| inputs: | ||
| - input: pipelineArtifact | ||
| artifactName: APIScanFiles | ||
| targetPath: ${{ parameters.softwareFolder }} | ||
| steps: | ||
| - ${{ each step in parameters.prepareSteps }}: | ||
| - ${{ each pair in step }}: | ||
| ${{ pair.key }}: ${{ pair.value }} | ||
|
|
||
| - task: APIScan@2 | ||
| displayName: Run APIScan | ||
| inputs: | ||
| softwareFolder: ${{ parameters.softwareFolder }} | ||
| softwareName: ${{ parameters.softwareName }} | ||
| softwareVersionNum: ${{ parameters.softwareVersion }} | ||
| softwareBuildNum: ${{ parameters.softwareBuildNum }} | ||
| azureSubscription: 'dotnet-apiscan' | ||
| env: | ||
| AzureServicesAuthConnectionString: RunAs=App;AppId=${{ parameters.AppId }};TenantId=${{ parameters.TenantId }};ServiceConnectionId=${{ parameters.ServiceConnectionId }}; | ||
| SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
|
|
||
| - task: PublishSecurityAnalysisLogs@3 | ||
| displayName: Publishing analysis artifacts | ||
| inputs: | ||
| ArtifactName: 'CodeAnalysisLogs' | ||
| ArtifactType: 'Container' | ||
| AllTools: true | ||
| ToolLogsNotFoundAction: 'Standard' | ||
|
|
||
| - ${{ each step in parameters.postSteps }}: | ||
| - ${{ each pair in step }}: | ||
| ${{ pair.key }}: ${{ pair.value }} |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded path 'Controls.Core' makes this specific to one component. Consider using a parameter or variable to make this more flexible for scanning other components.