From 290a75add4ad3a5ef16d95b9b092d385ce5de454 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:47:07 -0700 Subject: [PATCH 01/14] Create ps-test-devops.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-devops.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ps-test-devops.yml diff --git a/.github/workflows/ps-test-devops.yml b/.github/workflows/ps-test-devops.yml new file mode 100644 index 00000000..10172c86 --- /dev/null +++ b/.github/workflows/ps-test-devops.yml @@ -0,0 +1,32 @@ +# Read the official documentation here : https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-github + +name: "Microsoft Defender For Devops" +on: push + +jobs: + MSDO: + # currently only windows latest is supported + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 5.0.x + 6.0.x + - name: Azure PowerShell Action + uses: Azure/powershell@v1.2.0 + with: + # Specify the Az PowerShell script here. + inlineScript: | + Get-ChildItem env:* | sort-object name | select-object name, value + azPSVersion: "latest" + errorActionPreference: continue + - name: Run Microsoft Security DevOps + uses: microsoft/security-devops-action@v1.6.0 + id: msdo + - name: Upload results to Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: ${{ steps.msdo.outputs.sarifFile }} From 68c2305a90ad3528df788b358410cd4cbcc9e84e Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:04:04 -0700 Subject: [PATCH 02/14] Update ps-test-devops.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-devops.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ps-test-devops.yml b/.github/workflows/ps-test-devops.yml index 10172c86..3b3a535c 100644 --- a/.github/workflows/ps-test-devops.yml +++ b/.github/workflows/ps-test-devops.yml @@ -1,6 +1,6 @@ # Read the official documentation here : https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-github -name: "Microsoft Defender For Devops" +name: "PS Test DevOps" on: push jobs: From c09205d153dee37db36b44b32c23081b66a573fb Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:25:40 -0700 Subject: [PATCH 03/14] Update ps-test-devops.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-devops.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ps-test-devops.yml b/.github/workflows/ps-test-devops.yml index 3b3a535c..aa838dd3 100644 --- a/.github/workflows/ps-test-devops.yml +++ b/.github/workflows/ps-test-devops.yml @@ -26,7 +26,3 @@ jobs: - name: Run Microsoft Security DevOps uses: microsoft/security-devops-action@v1.6.0 id: msdo - - name: Upload results to Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: ${{ steps.msdo.outputs.sarifFile }} From 8d8fdceddfddbd49590ae37ffbe8704e8f9f0765 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Mon, 10 Apr 2023 15:52:04 -0700 Subject: [PATCH 04/14] Update ps-test-devops.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-devops.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ps-test-devops.yml b/.github/workflows/ps-test-devops.yml index aa838dd3..3b3a535c 100644 --- a/.github/workflows/ps-test-devops.yml +++ b/.github/workflows/ps-test-devops.yml @@ -26,3 +26,7 @@ jobs: - name: Run Microsoft Security DevOps uses: microsoft/security-devops-action@v1.6.0 id: msdo + - name: Upload results to Security tab + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: ${{ steps.msdo.outputs.sarifFile }} From 77db26b7d18b96bdc1f5e51076b4ef24be3948d1 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Mon, 10 Apr 2023 16:00:56 -0700 Subject: [PATCH 05/14] Update ps-test-devops.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-devops.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ps-test-devops.yml b/.github/workflows/ps-test-devops.yml index 3b3a535c..4670670c 100644 --- a/.github/workflows/ps-test-devops.yml +++ b/.github/workflows/ps-test-devops.yml @@ -26,7 +26,8 @@ jobs: - name: Run Microsoft Security DevOps uses: microsoft/security-devops-action@v1.6.0 id: msdo - - name: Upload results to Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: ${{ steps.msdo.outputs.sarifFile }} + - name: Upload alerts file as a workflow artifact + uses: actions/upload-artifact@v3 + with: + name: alerts + path: ${{ steps.msdo.outputs.sarifFile }} From f568b6a5ac59fd126f6ba4f90ce62949aee251c9 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Mon, 10 Apr 2023 17:08:34 -0700 Subject: [PATCH 06/14] Create ps-test-linux.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-linux.yml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ps-test-linux.yml diff --git a/.github/workflows/ps-test-linux.yml b/.github/workflows/ps-test-linux.yml new file mode 100644 index 00000000..4bca7994 --- /dev/null +++ b/.github/workflows/ps-test-linux.yml @@ -0,0 +1,35 @@ +# Read the official documentation here : https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-github + +name: "PS Test DevOps (linux)" +on: push + +jobs: + MSDO: + # currently only windows latest is supported + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 5.0.x + 6.0.x + - name: Azure PowerShell Action + uses: Azure/powershell@v1.2.0 + with: + # Specify the Az PowerShell script here. + inlineScript: | + Get-ChildItem env:* | sort-object name | select-object name, value + azPSVersion: "latest" + errorActionPreference: continue + - name: Run Microsoft Security DevOps + uses: microsoft/security-devops-action@v1.6.0 + id: msdo + inputs: + tools:description: bandit,credscan,eslint,templateanalyzer,terrascan + - name: Upload alerts file as a workflow artifact + uses: actions/upload-artifact@v3 + with: + name: alerts + path: ${{ steps.msdo.outputs.sarifFile }} From 35d41e2ef859cdf97673e555caed25857b0faddc Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Tue, 11 Apr 2023 09:58:11 -0700 Subject: [PATCH 07/14] Create credscan.gdnconfig Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .gdn/credscan.gdnconfig | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gdn/credscan.gdnconfig diff --git a/.gdn/credscan.gdnconfig b/.gdn/credscan.gdnconfig new file mode 100644 index 00000000..9c9db527 --- /dev/null +++ b/.gdn/credscan.gdnconfig @@ -0,0 +1,25 @@ +{ + "tools": [ + { + "tool": { + "name": "CredScan", + "version": "Latest" + }, + "arguments": { + "TargetDirectory": "$(Credscan.DefaultTargetDirectory)", + "SearcherPath": "", + "OutputFile": "", + "OutputType": "pre", + "BatchSize": "", + "SuppressAsError": "true", + "SuppressionsPath": "", + "Triage": "", + "Verbose": "", + "ConfigOverrides": "", + "DebugMode": "", + "FolderSuppression": "", + "Help": "" + } + } + ] +} From c50edc33feb75060717916deb8c88bf8345d5754 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Tue, 11 Apr 2023 13:32:09 -0700 Subject: [PATCH 08/14] Update ps-test-linux.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ps-test-linux.yml b/.github/workflows/ps-test-linux.yml index 4bca7994..876b7ca1 100644 --- a/.github/workflows/ps-test-linux.yml +++ b/.github/workflows/ps-test-linux.yml @@ -26,8 +26,8 @@ jobs: - name: Run Microsoft Security DevOps uses: microsoft/security-devops-action@v1.6.0 id: msdo - inputs: - tools:description: bandit,credscan,eslint,templateanalyzer,terrascan + with: + tools: bandit,credscan,eslint,templateanalyzer,terrascan - name: Upload alerts file as a workflow artifact uses: actions/upload-artifact@v3 with: From 6b04bb4030d00d0424622e664dfd8a952d8e93dd Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Tue, 11 Apr 2023 13:58:32 -0700 Subject: [PATCH 09/14] Delete credscan.gdnconfig Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .gdn/credscan.gdnconfig | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .gdn/credscan.gdnconfig diff --git a/.gdn/credscan.gdnconfig b/.gdn/credscan.gdnconfig deleted file mode 100644 index 9c9db527..00000000 --- a/.gdn/credscan.gdnconfig +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tools": [ - { - "tool": { - "name": "CredScan", - "version": "Latest" - }, - "arguments": { - "TargetDirectory": "$(Credscan.DefaultTargetDirectory)", - "SearcherPath": "", - "OutputFile": "", - "OutputType": "pre", - "BatchSize": "", - "SuppressAsError": "true", - "SuppressionsPath": "", - "Triage": "", - "Verbose": "", - "ConfigOverrides": "", - "DebugMode": "", - "FolderSuppression": "", - "Help": "" - } - } - ] -} From 2a3e0f195db7d775631ad14934531a324df0bd82 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:24:15 -0700 Subject: [PATCH 10/14] Create __Init__.py Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- src/__Init__.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/__Init__.py diff --git a/src/__Init__.py b/src/__Init__.py new file mode 100644 index 00000000..7fa58791 --- /dev/null +++ b/src/__Init__.py @@ -0,0 +1,5 @@ +print("Hello, World!") +client = SecretClient(vault_url=vault_url, credential=credential) +password = "test" +username = client.get_secret("apikey") +password = client.get_secret("apisecret") From a1b88eae800d17ae2d9138dd1aed6ff78e07c522 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Fri, 23 Jun 2023 16:39:26 -0700 Subject: [PATCH 11/14] Update ps-test-devops.yml Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-devops.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ps-test-devops.yml b/.github/workflows/ps-test-devops.yml index 4670670c..e04a1f46 100644 --- a/.github/workflows/ps-test-devops.yml +++ b/.github/workflows/ps-test-devops.yml @@ -24,8 +24,10 @@ jobs: azPSVersion: "latest" errorActionPreference: continue - name: Run Microsoft Security DevOps - uses: microsoft/security-devops-action@v1.6.0 + uses: microsoft/security-devops-action@v1.7.2 id: msdo + with: + tools: bandit,credscan,eslint,templateanalyzer,terrascan - name: Upload alerts file as a workflow artifact uses: actions/upload-artifact@v3 with: From 96ace345b32fdf435ace235a53020a2ee40311e7 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:44:12 -0700 Subject: [PATCH 12/14] Create ps-test-devops-self-hosted Signed-off-by: will477 <75505059+will477@users.noreply.github.com> --- .github/workflows/ps-test-devops-self-hosted | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ps-test-devops-self-hosted diff --git a/.github/workflows/ps-test-devops-self-hosted b/.github/workflows/ps-test-devops-self-hosted new file mode 100644 index 00000000..9d95ed81 --- /dev/null +++ b/.github/workflows/ps-test-devops-self-hosted @@ -0,0 +1,35 @@ +# Read the official documentation here : https://learn.microsoft.com/en-us/azure/defender-for-cloud/quickstart-onboard-github + +name: "PS Test DevOps-SelfHosted" +on: push + +jobs: + MSDO: + # currently only windows latest is supported + runs-on: self-hosted + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 5.0.x + 6.0.x + - name: Azure PowerShell Action + uses: Azure/powershell@v1.2.0 + with: + # Specify the Az PowerShell script here. + inlineScript: | + Get-ChildItem env:* | sort-object name | select-object name, value + azPSVersion: "latest" + errorActionPreference: continue + - name: Run Microsoft Security DevOps + uses: microsoft/security-devops-action@v1.7.2 + id: msdo + with: + tools: bandit,credscan,eslint,templateanalyzer,terrascan + - name: Upload alerts file as a workflow artifact + uses: actions/upload-artifact@v3 + with: + name: alerts + path: ${{ steps.msdo.outputs.sarifFile }} From e38e847781f743f8e2cb3e0c0bb4f17908c9b4d8 Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:53:05 -0700 Subject: [PATCH 13/14] Rename --- ...{ps-test-devops-self-hosted => ps-test-devops-self-hosted.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ps-test-devops-self-hosted => ps-test-devops-self-hosted.yml} (100%) diff --git a/.github/workflows/ps-test-devops-self-hosted b/.github/workflows/ps-test-devops-self-hosted.yml similarity index 100% rename from .github/workflows/ps-test-devops-self-hosted rename to .github/workflows/ps-test-devops-self-hosted.yml From cec5df2efa39cb9d386e21f25dc09a6b5d80ad4a Mon Sep 17 00:00:00 2001 From: will477 <75505059+will477@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:03:08 -0700 Subject: [PATCH 14/14] Update ps-test-devops-self-hosted.yml --- .../workflows/ps-test-devops-self-hosted.yml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ps-test-devops-self-hosted.yml b/.github/workflows/ps-test-devops-self-hosted.yml index 9d95ed81..1026ff16 100644 --- a/.github/workflows/ps-test-devops-self-hosted.yml +++ b/.github/workflows/ps-test-devops-self-hosted.yml @@ -10,19 +10,19 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 5.0.x - 6.0.x - - name: Azure PowerShell Action - uses: Azure/powershell@v1.2.0 - with: - # Specify the Az PowerShell script here. - inlineScript: | - Get-ChildItem env:* | sort-object name | select-object name, value - azPSVersion: "latest" - errorActionPreference: continue +# - uses: actions/setup-dotnet@v3 +# with: +# dotnet-version: | +# 5.0.x +# 6.0.x +# - name: Azure PowerShell Action +# uses: Azure/powershell@v1.2.0 +# with: +# # Specify the Az PowerShell script here. +# inlineScript: | +# Get-ChildItem env:* | sort-object name | select-object name, value +# azPSVersion: "latest" +# errorActionPreference: continue - name: Run Microsoft Security DevOps uses: microsoft/security-devops-action@v1.7.2 id: msdo