Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 663a314

Browse files
authored
Tar files before scanning for malware (#99)
* remove old virus scan * tar.gz the contents and scan that * capture the tar.gz
1 parent b3a3f7e commit 663a314

File tree

3 files changed

+10
-43
lines changed

3 files changed

+10
-43
lines changed

.vsts-ci/releaseBuild.yml

-6
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,3 @@ stages:
4949
parameters:
5050
channel: lts
5151
release: ${{ parameters.release }}
52-
53-
- stage: Compliance
54-
dependsOn: []
55-
displayName: Compliance
56-
jobs:
57-
- template: ./templates/virusScanPhase.yml

.vsts-ci/templates/pushPhase.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717

1818
- job: scan
1919
displayName: Scan ${{ parameters.channel }}
20-
dependsOn:
21-
- push_approval
2220

2321
pool:
2422
name: $(ubuntuPool)
@@ -32,6 +30,8 @@ jobs:
3230
value: $(Agent.TempDirectory)/pwshSnap
3331
- name: SNAP_COPY
3432
value: $(Agent.TempDirectory)/pwshSnapCopy
33+
- name: SNAP_TARGZ
34+
value: $(Agent.TempDirectory)/pwshSnap.tar.gz
3535

3636

3737
steps:
@@ -75,11 +75,17 @@ jobs:
7575
get-childitem -recurse $readWriteCopy
7676
displayName: Copy to read/write fs
7777
78+
- pwsh: |
79+
Write-Verbose "tar -czf ${env:SNAP_TARGZ} ${env:SNAP_COPY}" -Verbose
80+
tar -czf ${env:SNAP_TARGZ} ${env:SNAP_COPY}
81+
Write-Host "##vso[artifact.upload containerfolder=$(channel);artifactname=$(channel)]${env:SNAP_TARGZ}"
82+
displayName: tar the snap contents from the r/w copy
83+
7884
- template: EsrpScan.yml@ComplianceRepo
7985
parameters:
80-
scanPath: $(SNAP_COPY)
86+
scanPath: $(Agent.TempDirectory)
8187
pattern: |
82-
**/*
88+
**/*.tar.gz
8389
scanningService: 'pwshEsrpScanning'
8490

8591
- job: push

.vsts-ci/templates/virusScanPhase.yml

-33
This file was deleted.

0 commit comments

Comments
 (0)