
Lantek_AMarin (Community Member) asked a question.
Hi,
I have been working on Veracode scan with .NET and Angular application profiles. With .NET profiles I have had no problems beyond initial errors. I'm having trouble scanning Typescript (Angular) based projects. I have verified that the version is supported and have consulted the packaging documentation. I have tried to upload Angular artifacts that are exported on ./dist folder with package.json and package-lock.json (as dependencies or devDependencies files) usaing Azure Devops build pipeline. So, the files that I tried upload seems like bellow:
/bin/bash --noprofile --norc /azp/agent/_work/_temp/a5103581-dd8e-4c48-97b1-a291423fa275.sh
total 8824
-rw-r--r-- 1 root root 327 Jan 4 16:27 5-es2015.1483d25e3463f67045eb.js
-rw-r--r-- 1 root root 470 Jan 4 16:27 5-es5.1483d25e3463f67045eb.js
-rw-r--r-- 1 root root 324 Jan 4 16:27 6-es2015.a0f406f420f7ce01363a.js
-rw-r--r-- 1 root root 467 Jan 4 16:27 6-es5.a0f406f420f7ce01363a.js
-rw-r--r-- 1 root root 327 Jan 4 16:27 7-es2015.c80a807b7d362bbada12.js
-rw-r--r-- 1 root root 470 Jan 4 16:27 7-es5.c80a807b7d362bbada12.js
-rw-r--r-- 1 root root 3740706 Jan 4 16:27 main-es2015.eb0ba219b1703f673c3b.js
-rw-r--r-- 1 root root 3994033 Jan 4 16:27 main-es5.eb0ba219b1703f673c3b.js
-rw-r--r-- 1 root root 381144 Jan 4 16:27 oidc-client.min.js
-rw-r--r-- 1 root root 603110 Jan 4 16:27 package-lock.json
-rw-r--r-- 1 root root 2911 Jan 4 16:27 package.json
-rw-r--r-- 1 root root 37656 Jan 4 16:27 polyfills-es2015.1e7dcdc3feea03289b00.js
-rw-r--r-- 1 root root 133216 Jan 4 16:27 polyfills-es5.d44e66589adae711ac1f.js
-rw-r--r-- 1 root root 2339 Jan 4 16:27 runtime-es2015.7b648a18c9c7b450469d.js
-rw-r--r-- 1 root root 2336 Jan 4 16:27 runtime-es5.7b648a18c9c7b450469d.js
-rw-r--r-- 1 root root 89171 Jan 4 16:27 scripts.b306dd7ae3694cfd8910.js
Finishing: Show and delete unnecessary assets
In the following task I tried to upload and scan the files with the message "Error: Cannot prescan a build with no uploaded/valid files" and in the Veracode platform there is no files to scan. The task export the following logs:
[2022.01.04 16:28:16.486]
[2022.01.04 16:28:16.486] Uploading: /azp/agent/_work/3/a/veracode-app-artifacts/filtered/runtime-es5.7b648a18c9c7b450469d.js
[2022.01.04 16:28:17.851]
[2022.01.04 16:28:17.851] Uploading: /azp/agent/_work/3/a/veracode-app-artifacts/filtered/polyfills-es2015.1e7dcdc3feea03289b00.js
[2022.01.04 16:28:19.146]
[2022.01.04 16:28:19.146] Uploading: /azp/agent/_work/3/a/veracode-app-artifacts/filtered/runtime-es2015.7b648a18c9c7b450469d.js
[2022.01.04 16:28:20.203]
[2022.01.04 16:28:20.203] Uploading: /azp/agent/_work/3/a/veracode-app-artifacts/filtered/5-es2015.1483d25e3463f67045eb.js
[2022.01.04 16:28:22.827]
[2022.01.04 16:28:22.827] Uploading: /azp/agent/_work/3/a/veracode-app-artifacts/filtered/6-es2015.a0f406f420f7ce01363a.js
[2022.01.04 16:28:24.037]
[2022.01.04 16:28:24.037] Starting pre-scan verification for application "Lantek360.Edge.Monitoring.Front" sandbox "TASK-veracode" analysis "20220104.7".
Start Obtaining Build Info
/usr/bin/java -jar /azp/agent/_work/_tasks/Veracode_6292a058-d4f5-407b-b6c6-815df9ee59d6/3.8.0/VeracodeJavaAPI.jar -action getbuildinfo -appid 1314462 -vid *** -vkey *** -sandboxid 4177015 -useragent VeracodeVSTSExtension/3.8.0 (Node/v6.17.1)
[2022.01.04 16:28:16.486] Error: Unable to upload file. The file cannot be analyzed.
[2022.01.04 16:28:17.851] Error: Unable to upload file. The file cannot be analyzed.
[2022.01.04 16:28:19.145] Error: Unable to upload file. The file cannot be analyzed.
[2022.01.04 16:28:20.203] Error: Unable to upload file. The file cannot be analyzed.
[2022.01.04 16:28:22.827] Error: Unable to upload file. The file cannot be analyzed.
[2022.01.04 16:28:24.036] Error: Unable to upload file. The file cannot be analyzed.
[2022.01.04 16:28:25.042]
[2022.01.04 16:28:25.042] Error occured while starting pre-scan for analysis "20220104.7" of application "XXXXXXXXXXXXXXXX". Error: Unable to start pre-scan. Error: Cannot prescan a build with no uploaded/valid files
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<analysis_unit analysis_type="Static" status="Incomplete"/>
</build>
</buildinfo>
.png)
I have also tried to do a scan uploading the files manually from the platform with similar results, what am I doing wrong?
Hi @Lantek_AMarin (Community Member) , could resolve this issue??
I'm having the same problem using AZURE DEVOPS integration (uploadandscan).