Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Run checks on devdiv (#15765)
Browse files Browse the repository at this point in the history
* Run checks on devdiv

* Fix loopmode
  • Loading branch information
rmarinho authored Jun 13, 2023
1 parent d68e84f commit 4f3acdf
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 74 deletions.
4 changes: 2 additions & 2 deletions Xamarin.Forms.Platform.iOS/CADisplayLinkTicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected override void DisableTimer()
{
if (_link != null)
{
_link.RemoveFromRunLoop(NSRunLoop.Current, NSRunLoop.NSRunLoopCommonModes);
_link.RemoveFromRunLoop(NSRunLoop.Current, NSRunLoopMode.Common);
_link.Dispose();
}
_link = null;
Expand All @@ -42,7 +42,7 @@ protected override void DisableTimer()
protected override void EnableTimer()
{
_link = CADisplayLink.Create(() => SendSignals());
_link.AddToRunLoop(NSRunLoop.Current, NSRunLoop.NSRunLoopCommonModes);
_link.AddToRunLoop(NSRunLoop.Current, NSRunLoopMode.Common);
}

void StartThread()
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Forms.Platform.iOS/Renderers/OpenGLViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void SetupRenderLoop(bool oneShot)
_displayLink = null;
}
});
_displayLink.AddToRunLoop(NSRunLoop.Current, NSRunLoop.NSRunLoopCommonModes);
_displayLink.AddToRunLoop(NSRunLoop.Current, NSRunLoopMode.Common);
}

class Delegate : GLKViewDelegate
Expand Down
121 changes: 50 additions & 71 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,78 +182,8 @@ stages:
steps:
- template: build/steps/build-osx.yml

- stage: PoliCheck
displayName: 'Code Analysis'
dependsOn: windows
jobs:
- job: run_poli_check
displayName: 'Policheck And Credentials Compliance'
pool:
name: $(vs2019VmPool)
vmImage: $(vs2019VmImage)
timeoutInMinutes: 60
cancelTimeoutInMinutes: 5
steps:
- checkout: self

- template: security/policheck/v2.yml@xamarin-templates

- template: security/credscan/v3.yml@xamarin-templates
parameters:
suppressionsFile: $(System.DefaultWorkingDirectory)\build\automation\CredScanSuppressions.json

- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4
displayName: Run AntiMalware (Defender) Scan
inputs:
FileDirPath: $(System.DefaultWorkingDirectory)
EnableServices: true
condition: succeededOrFailed()

- task: securedevelopmentteam.vss-secure-development-tools.build-task-report.SdtReport@2
displayName: Create Security Analysis Report
inputs:
CredScan: true
PoliCheck: true
condition: succeededOrFailed()

- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
displayName: Publish Security Analysis Logs
inputs:
ArtifactName: CodeAnalysisLogs
condition: succeededOrFailed()

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: Fail Job if Security Issues are Detected
inputs:
CredScan: true
PoliCheck: true
GdnBreakGdnToolPoliCheckSeverity: 'Error'
condition: succeededOrFailed()

# - job: api_scan
# displayName: APIScan Compliance
# pool:
# name: $(corpVmImage)
# steps:
# - checkout: none
# clean: true

# - task: DownloadBuildArtifacts@0
# displayName: 'Download build artifact win_build'
# inputs:
# artifactName: win_build
# downloadPath: $(Build.StagingDirectory)

# - task: securedevelopmentteam.vss-secure-development-tools.build-task-apiscan.APIScan@2
# displayName: 'Run APIScan'
# inputs:
# softwareFolder: '$(Build.StagingDirectory)\win_build'
# softwareName: Xamarin.Forms
# softwareVersionNum: $(Build.BuildNumber)
# isLargeApp: false

# only sign using the private server and not sigining Maui for now
- ${{ if and(eq(variables['System.TeamProject'], 'devdiv'), ne(variables['System.DefinitionId'], '13330')) }}:
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- stage: nuget_signing
dependsOn: windows
displayName: Sign Nuget
Expand All @@ -270,6 +200,55 @@ stages:
- task: NuGetToolInstaller@1
inputs:
versionSpec: $(NUGET_VERSION)

- stage: PoliCheck
displayName: 'Code Analysis'
dependsOn: windows
jobs:
- job: run_poli_check
displayName: 'Policheck And Credentials Compliance'
pool:
name: $(vs2019VmPool)
vmImage: $(vs2019VmImage)
timeoutInMinutes: 60
cancelTimeoutInMinutes: 5
steps:
- checkout: self

- template: security/policheck/v2.yml@xamarin-templates

- template: security/credscan/v3.yml@xamarin-templates
parameters:
suppressionsFile: $(System.DefaultWorkingDirectory)\build\automation\CredScanSuppressions.json

- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4
displayName: Run AntiMalware (Defender) Scan
inputs:
FileDirPath: $(System.DefaultWorkingDirectory)
EnableServices: true
condition: succeededOrFailed()

- task: securedevelopmentteam.vss-secure-development-tools.build-task-report.SdtReport@2
displayName: Create Security Analysis Report
inputs:
CredScan: true
PoliCheck: true
condition: succeededOrFailed()

- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
displayName: Publish Security Analysis Logs
inputs:
ArtifactName: CodeAnalysisLogs
condition: succeededOrFailed()

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: Fail Job if Security Issues are Detected
inputs:
CredScan: true
PoliCheck: true
GdnBreakGdnToolPoliCheckSeverity: 'Error'
condition: succeededOrFailed()

- stage: sbom
dependsOn: nuget_signing
displayName: 'Software Bill of Materials'
Expand Down

0 comments on commit 4f3acdf

Please sign in to comment.