Skip to content

Add SecurityTools (CredScan, BinSkim, PoliCheck) to PR builds in ADO #9035

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 34 commits into from
May 1, 2019

Conversation

MiYanni
Copy link
Contributor

@MiYanni MiYanni commented Apr 18, 2019

Description

This allows our PR build process to run CredScan, BinSkim, and PoliCheck. This only happens in the Windows PowerShell pipeline, since we only need to run it once and it can only run on Windows. I also removed the travis yml since we shouldn't need to use Travis anymore.

Checklist

$repoRoot = "$PSScriptRoot/../.."
$binSkim = (Get-Item -Path "$repoRoot/tools/SecurityTools/Microsoft.CodeAnalysis.BinSkim*/tools/*/win-x64/BinSkim.exe" | Select-Object -First 1).FullName
$dllBaseFolder = "$repoRoot/artifacts/Debug"
$suppressions = @('Microsoft.Azure.DataLake.Store.dll','Microsoft.WindowsAzure.Storage.DataMovement.PowerShell.dll')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these suppressions come from failures or from previous suppression?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are new failures. It seems these are signed with Sha1+Sha2. So, to avoid these suppressions, we would need resigned DLLs. I did, however, want to have a suppression strategy for BinSkim since it natively doesn't allow it.

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 2 pipeline(s).

@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 26, 2019

/azp run azure-powershell - security-tools

@azure-pipelines
Copy link
Contributor

For the Azure DevOps organization azure-sdk, no matching pipelines using the Azure Pipelines app were found for this pull request.

@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 26, 2019

/azp run "azure-powershell - security-tools"

@azure-pipelines
Copy link
Contributor

For the Azure DevOps organization azure-sdk, no matching pipelines using the Azure Pipelines app were found for this pull request.

@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 26, 2019

/azp help

@azure-pipelines
Copy link
Contributor

Supported commands
     help:
          Get descriptions, examples and documentation about supported commands
          Example: help "command_name"
     run:
          Run all pipelines or a specific pipeline for this repository using a comment. Use
          this command by itself to trigger all related pipelines, or specify a pipeline
          to run.
          Example: "run" or "run pipeline_name"

See additional documentation.

@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 26, 2019

/azp "run azure-powershell - security-tools"

@azure-pipelines
Copy link
Contributor

Command '"run' is not supported by Azure Pipelines.

Supported commands
     help:
          Get descriptions, examples and documentation about supported commands
          Example: help "command_name"
     run:
          Run all pipelines or a specific pipeline for this repository using a comment. Use
          this command by itself to trigger all related pipelines, or specify a pipeline
          to run.
          Example: "run" or "run pipeline_name"

See additional documentation.

@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 26, 2019

/azp run azure-powershell - powershell-core

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@MiYanni MiYanni marked this pull request as ready for review April 26, 2019 22:55
@MiYanni MiYanni removed their assignment Apr 26, 2019
@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 27, 2019

@@ -29,9 +29,6 @@ namespace Commands.HDInsight.Test.UnitTests
public class DataLakeStoreTests : HDInsightTestBase
{
private NewAzureHDInsightClusterCommand cmdlet;
private const string StorageName = "dummystorage.blob.core.windows.net";
private const string StorageKey = "O9EQvp3A3AjXq/W27rst1GQfLllhp01qlJMJfSU1hVW2K42gUeiUUn2D8zX2lU3taiXSSfqkZlcPv+nQcYYwUx==";
private const int ClusterSize = 4;
Copy link
Contributor Author

@MiYanni MiYanni Apr 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These variables were unused in this class and were flagged by CredScan. Made more sense to remove unused creds than to suppress them.

@@ -1,3 +0,0 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an unused example suppressions file.

@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 27, 2019

@MiYanni
Copy link
Contributor Author

MiYanni commented Apr 30, 2019

Manual build using new service connection: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=24263

@markcowl markcowl merged commit 6350c76 into Azure:master May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants