Skip to content
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

[ci] Move to new compliance task #19475

Merged
merged 38 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8ae7e85
Try security/full/v1.yml
rmarinho Dec 13, 2023
e977011
try again
rmarinho Dec 13, 2023
1c318d5
Fix
rmarinho Dec 13, 2023
d07f0e5
Try again only dll
rmarinho Dec 13, 2023
96a639d
Disable for now
rmarinho Dec 13, 2023
37be349
Only on windows
rmarinho Dec 13, 2023
d3d67e7
try binskim again
rmarinho Dec 13, 2023
1b19843
Try skip provisioning
rmarinho Dec 13, 2023
8526441
Add logging
rmarinho Dec 13, 2023
f2b1258
Missing semicolumn
rmarinho Dec 13, 2023
f5d9bc7
Update glob
rmarinho Dec 13, 2023
b8aa95e
Fix glob
rmarinho Dec 13, 2023
0968f32
Update provisioning file
rmarinho Dec 13, 2023
1d6e91a
We don't need vs anymore
rmarinho Dec 13, 2023
5844729
try exclude
rmarinho Dec 13, 2023
4a974d9
Need to provision api
rmarinho Dec 13, 2023
449aef9
Try exclude
rmarinho Dec 13, 2023
7034bca
Fixes for compliance
rmarinho Dec 15, 2023
c484deb
Update handlers.yml
rmarinho Dec 15, 2023
6ece314
Create PoliCheck.Exclusions.xml
rmarinho Dec 15, 2023
5eabdfc
Update PoliCheck.Exclusions.xml
rmarinho Dec 15, 2023
9240045
Try again
rmarinho Dec 15, 2023
c54c984
Exclusions please work
rmarinho Dec 15, 2023
a886ca7
Fix name
rmarinho Dec 15, 2023
411b1bc
Try one element
rmarinho Dec 15, 2023
a10a834
Rename source.gdnsuppress.json to source.gdnsuppress
rmarinho Dec 18, 2023
e2a0351
Update handlers.yml
rmarinho Dec 18, 2023
0f60cd5
Update source.gdnsuppress
rmarinho Dec 18, 2023
5285dfe
Enable api scan
rmarinho Dec 18, 2023
252f957
Update handlers.yml
rmarinho Dec 18, 2023
186e15c
Update handlers.yml
rmarinho Dec 18, 2023
9bd0e56
Update handlers.yml
rmarinho Dec 18, 2023
15574bf
Update handlers.yml
rmarinho Dec 18, 2023
2f95abb
Update source.gdnsuppress
rmarinho Dec 19, 2023
0542ea1
Run on nightly or on demand
rmarinho Dec 19, 2023
839008e
Update handlers.yml
rmarinho Dec 19, 2023
f9503c1
Update handlers.yml
rmarinho Dec 19, 2023
f14192a
Just a little more cleanup
rmarinho Dec 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions eng/automation/guardian/PoliCheck.Exclusions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Upper case must be used. All values will be compared only to the upper case strings -->
<PoliCheckExclusions>
<!-- Reminder: you are only allowed one exclusion element of each type, to have multiple values you must pipe separate them in a single element -->
<!-- Each of these exclusions is a folder name - if \[name]\ exists in the file path, it will be skipped -->
<Exclusion Type="FolderPathFull">SAMPLES|CONTROLGALLERY|PUBLICAPI</Exclusion>
<!-- Each of these exclusions is a folder name - if any folder or file starts with "\[name]", it will be skipped -->
<!-- <Exclusion Type="FolderPathStart">SRC\CONTROLS\SAMPLES</Exclusion> -->
<!-- Each of these file types will be completely skipped for the entire scan -->
<!--<Exclusion Type="FileType">.ABC|.XYZ</Exclusion>-->
<!-- The specified file names will be skipped during the scan regardless which folder they are in -->
<!-- <Exclusion Type="FileName">POLICHECK.EXCLUSIONS.xml</Exclusion> -->
</PoliCheckExclusions>
157 changes: 157 additions & 0 deletions eng/automation/guardian/source.gdnsuppress
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"hydrated": false,
"properties": {
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/suppressions",
"hydrationStatus": "This file does not contain identifying data. It is safe to check into your repo. To hydrate this file with identifying data, run `guardian hydrate --help` and follow the guidance."
},
"version": "1.0.0",
"suppressionSets": {
"default": {
"name": "default",
"createdDate": "2023-12-19 01:00:51Z",
"lastUpdatedDate": "2023-12-19 01:00:51Z"
}
},
"results": {
"2b52868fe039fbd90740afbc18547ee681ff4d31b9e735baf1910f725047c91b": {
"signature": "2b52868fe039fbd90740afbc18547ee681ff4d31b9e735baf1910f725047c91b",
"alternativeSignatures": [
"32b53436aab7fe01be76eeaf55fdc480ae3e288068c975c330204f5214bac1a6"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"c68a8b69a701b249a1f8559a6312f9c84f2ddf6fbe015311e3bcecd1452c3fa8": {
"signature": "c68a8b69a701b249a1f8559a6312f9c84f2ddf6fbe015311e3bcecd1452c3fa8",
"alternativeSignatures": [
"9f3289403408e6061bef02f2797caf0ee33588822d0749fbab6217d53f9b94ad"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"9b093cc0042c0213b961f8dda54e23e465522102c54ce85f260b5c4e976e24b0": {
"signature": "9b093cc0042c0213b961f8dda54e23e465522102c54ce85f260b5c4e976e24b0",
"alternativeSignatures": [
"5d69d137eb65b19f533fb743aefd2e24e8a791fc0cd401176694d67062637c9a"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"30e1cedbc2fa0acb44a51cce387d330b006ae6d03b225703795aed30d4f8ca15": {
"signature": "30e1cedbc2fa0acb44a51cce387d330b006ae6d03b225703795aed30d4f8ca15",
"alternativeSignatures": [
"5d69d137eb65b19f533fb743aefd2e24e8a791fc0cd401176694d67062637c9a"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"a93d8f47d6ed3667a8da9052bb2c3bfda4aa34ad1a364baa67e72598e5c5f0ec": {
"signature": "a93d8f47d6ed3667a8da9052bb2c3bfda4aa34ad1a364baa67e72598e5c5f0ec",
"alternativeSignatures": [
"5d69d137eb65b19f533fb743aefd2e24e8a791fc0cd401176694d67062637c9a"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"ad7d097158e927bb550e7e929040af3c7690f98a898fb1e7d44acb7de74bc236": {
"signature": "ad7d097158e927bb550e7e929040af3c7690f98a898fb1e7d44acb7de74bc236",
"alternativeSignatures": [
"5d69d137eb65b19f533fb743aefd2e24e8a791fc0cd401176694d67062637c9a"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"73fff606a22ef12984983efea617234d0624347dce685ba29580636fbfe21fa9": {
"signature": "73fff606a22ef12984983efea617234d0624347dce685ba29580636fbfe21fa9",
"alternativeSignatures": [
"b8db8607e95111d16e9125b7a15689579e040253897a5559418c3ebf83174931"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"d78e5435e84b69f2d03d73c1fad7d14fc1c699d1d97921bcd98137d849cb90a1": {
"signature": "d78e5435e84b69f2d03d73c1fad7d14fc1c699d1d97921bcd98137d849cb90a1",
"alternativeSignatures": [
"b8db8607e95111d16e9125b7a15689579e040253897a5559418c3ebf83174931"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"df2396825a2e98d82d6abf7b7106987a5613d09d3643410a74f50d51689bfdda": {
"signature": "df2396825a2e98d82d6abf7b7106987a5613d09d3643410a74f50d51689bfdda",
"alternativeSignatures": [
"b759d6fa2abf85fa275dad1dfa965b5ba20f8419a7b6b8b1a4fe1a6abf2e6fb0"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"bedac00ddbef304982dfa919c5d312818ea90512fb54f897ea57911e36f5e0ec": {
"signature": "bedac00ddbef304982dfa919c5d312818ea90512fb54f897ea57911e36f5e0ec",
"alternativeSignatures": [
"b759d6fa2abf85fa275dad1dfa965b5ba20f8419a7b6b8b1a4fe1a6abf2e6fb0"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"90535343707d61f2fe054d504e4d850d8c5b50c6ffc73350e35cf5c487766fcf": {
"signature": "90535343707d61f2fe054d504e4d850d8c5b50c6ffc73350e35cf5c487766fcf",
"alternativeSignatures": [
"aae683218cf322239f79f0abe2647683ed8ebfd5692c73a6eca1c2050c22b131"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"15be33aeb230ab1a9b067b8d49e7f785f06ba31b48a03f3ca560da362f587c9a": {
"signature": "15be33aeb230ab1a9b067b8d49e7f785f06ba31b48a03f3ca560da362f587c9a",
"alternativeSignatures": [
"aae683218cf322239f79f0abe2647683ed8ebfd5692c73a6eca1c2050c22b131"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"bec2d784ae75dca8841b36ab4e65a3a1ef78db105126a282b0905ed4aad9edc0": {
"signature": "bec2d784ae75dca8841b36ab4e65a3a1ef78db105126a282b0905ed4aad9edc0",
"alternativeSignatures": [
"aae683218cf322239f79f0abe2647683ed8ebfd5692c73a6eca1c2050c22b131"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"6ac0182599ced04419c0501d9eddd2dc150da498f8495b564d9c7d5288f881ae": {
"signature": "6ac0182599ced04419c0501d9eddd2dc150da498f8495b564d9c7d5288f881ae",
"alternativeSignatures": [
"d957e575f6cc3e6e8a4385fcd0c99eb88a6f7b75af4c75a779a5487c38c00e41"
],
"memberOf": [
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
}
}
}
11 changes: 11 additions & 0 deletions eng/automation/guardian/tsaoptions-v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"codebaseName": "dotnet.maui_main",
"notificationAliases": [
"dotnet-maui-eng@microsoft.com"
],
"instanceUrl": "https://devdiv.visualstudio.com/",
"projectName": "DevDiv",
"areaPath": "DevDiv\\VS Client - Runtime SDKs\\MAUI",
"iterationPath": "DevDiv",
"allTools": true
}
22 changes: 22 additions & 0 deletions eng/pipelines/common/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ parameters:
type: string
default: 'nuget'

- name: artifactBinaries
type: string
default: 'pack-binaries'

- name: nugetFolder
type: string
default: 'artifacts'
Expand All @@ -41,6 +45,7 @@ steps:
poolName: ${{ parameters.poolName }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
gitHubToken: ${{ parameters.gitHubToken }}
skipAndroidImages: true

- ${{ each step in parameters.prepareSteps }}:
- ${{ each pair in step }}:
Expand Down Expand Up @@ -159,3 +164,20 @@ steps:
PathToPublish: ${{ parameters.checkoutDirectory }}/artifacts/docs-packs
ArtifactName: xml-docs

# binaries for compliance scanning
- task: CopyFiles@2
displayName: 'Copy Binaries Files'
condition: succeeded()
inputs:
Contents: |
${{ parameters.checkoutDirectory }}/src/Controls/src/Nuget/bin/Release/**/*.dll
TargetFolder: ${{ parameters.checkoutDirectory }}/binaries
flattenFolders: false

- task: PublishBuildArtifacts@1
condition: succeeded()
displayName: publish binaries artifacts
inputs:
PathToPublish: ${{ parameters.checkoutDirectory }}/binaries
ArtifactName: ${{ parameters.artifactBinaries }}

40 changes: 9 additions & 31 deletions eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
parameters:
poolName: ''
skipXcode: false
skipVS: true
skipProvisioning: $(skipProvisionator)
skipAndroidSdks: false
skipAndroidImages: false
checkoutDirectory: $(System.DefaultWorkingDirectory)
provisionatorPath: $(provisionator.path)
provisionatorXCodePath: $(provisionator.xcode)
provisionatorVSPath: $(provisionator.vs)
provisionatorChannel: 'latest'
provisionatorExtraArguments: $(provisionator.extraArguments)
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
Expand Down Expand Up @@ -49,8 +48,10 @@ steps:
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_COMPONENTS_MAC_IOS_CERTIFICATE_P12: ${{ parameters.certPass }}
${{ if eq(parameters.skipAndroidSdks, 'true') }}:
SKIP_ANDROID_API_SDKS: true
${{ if eq(parameters.skipAndroidSdks, true) }}:
SKIP_ANDROID_API_SDKS: 'true'
${{ if eq(parameters.skipAndroidImages, true) }}:
SKIP_ANDROID_API_IMAGES: 'true'

# Setup JDK Paths (gradle needs it)
- bash: |
Expand All @@ -70,33 +71,6 @@ steps:
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

# Prepare Windows
- powershell: |
if (-not $(where.exe pwsh)) {
$url = "https://github.com/PowerShell/PowerShell/releases/download/v$env:POWERSHELL_VERSION/PowerShell-$env:POWERSHELL_VERSION-win-x64.msi"
$output = "$env:TEMP\PowerShell.msi"
Remove-Item -Force $output -ErrorAction Ignore
Invoke-WebRequest -Uri $url -OutFile $output
msiexec.exe /package $output /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1
}
displayName: 'Install PowerShell Core'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

- ${{ if ne(parameters.skipVS, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Visual Studio'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
inputs:
provisioning_script: ${{ parameters.checkoutDirectory }}/${{ parameters.provisionatorVSPath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
github_token: ${{ parameters.gitHubToken }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
- pwsh: |
$msbuild = "$env:ProgramFiles/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/MSBuild.exe"
echo "##vso[task.setvariable variable=MSBUILD_EXE]$msbuild"
displayName: 'Setup MSBuild Paths'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

# Provision Additional Software
- ${{ if ne(parameters.skipProvisioning, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
Expand All @@ -108,6 +82,10 @@ steps:
github_token: ${{ parameters.gitHubToken }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
${{ if eq(parameters.skipAndroidSdks, true) }}:
SKIP_ANDROID_API_SDKS: 'true'
${{ if eq(parameters.skipAndroidImages, true) }}:
SKIP_ANDROID_API_IMAGES: 'true'

- pwsh: |
if ($env:JAVA_HOME_11_X64) {
Expand Down
50 changes: 0 additions & 50 deletions eng/pipelines/common/security-compliance.yml

This file was deleted.

2 changes: 0 additions & 2 deletions eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ variables:
value: 'eng/provisioning/xcode.csx'
- name: provisionator.path
value: 'eng/provisioning/provisioning.csx'
- name: provisionator.vs
value: 'eng/provisioning/vs.csx'
- name: provisionator.extraArguments
value: '-vvvv'
- name: DotNet.Dir
Expand Down
Loading
Loading