Skip to content

Commit

Permalink
Update sastscan.ts
Browse files Browse the repository at this point in the history
updated size check from 100 to 200 mb
  • Loading branch information
rosnermd authored Oct 14, 2021
1 parent 4a77eaf commit 8ba7a95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildAndReleaseTask/sastscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ async function run(): Promise<void> {
scanTarget = await prepareScanTarget(scanTarget);
console.log('Scan Target: ' + `${scanTarget}`);

// Check the input file to make sure it is < 100 MB as the scanner does not support it
// Check the input file to make sure it is < 200 MB as the scanner does not support it
// https://help.veracode.com/reader/tS9CaFwL4_lbIEWWomsJoA/keSyYhPseqTAGwmhLFy2yA
const stats: fs.Stats = fs.statSync(scanTarget);
const fileSizeInBytes: number = stats.size;
const fileSizeInMb: number = fileSizeInBytes / 1000000;
const fileSizeInMb: number = fileSizeInBytes / 2000000;
console.log('Scan Target File Size: ' + `${fileSizeInMb}` + ' MB.');

if (fileSizeInMb > 100) {
throw new Error('Scan Target is too big, please submit a file that is less than 100 MB.');
if (fileSizeInMb > 200) {
throw new Error('Scan Target is too big, please submit a file that is less than 200 MB.');
}

// Remove results.json if it already exists
Expand Down

0 comments on commit 8ba7a95

Please sign in to comment.