
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@lifeomic/veracode-client-js
Advanced tools
REST API client for Veracode. Uses xml-js to parse xml. Functionality follows the original Veracode API documentation.
yarn add @lifeomic/veracode-client-js
For convenience, all methods use objects to pass parameters, e.g. when the
original function expects parameters app_id and sandbox_id, VeracodeClient
function would be called the following object as parameter: {appId, sandboxId}
Please see tests for more examples.
Usage example:
const os = require('os');
const VeracodeClient = require('@lifeomic/veracode-client');
const veraClient = new VeracodeClient({
apiId: process.env.VERA_ID,
apiKey: process.env.VERA_KEY
});
const testAppInfo = {
appName: 'TestApp',
appVersion: 'TestVersion',
sandboxName: 'TestSandbox',
businessCriticality: 'High', // 'High' is used by security-scan
teams: 'Security', // Only security team will get notifications about this test app
autoScan: true, // Required to start scan automatically after pre-scan
description: 'Test application, safe to delete'
};
const appId = (await veraClient.createApp(testAppInfo)).application._attributes.app_id;
console.log('New app ID:', appId);
testAppInfo.appId = app_id;
const sandboxId = (await veraClient.createSandbox(testAppInfo)).sandbox._attributes.sandbox_id;
console.log('New Sandbox ID:', sandboxId);
testAppInfo.sandboxId = sandboxId;
const buildId = (await veraClient.createBuild(testAppInfo)).build._attributes.build_id;
console.log('New Build ID:', buildId);
testAppInfo.file = path.join(os.tmpdir(), `testapp.zip`);
await veraClient.createZipArchive('/my/source/code/location', testAppInfo.file, [ 'node_modules/**/*' ]);
const fileId = (await veraClient.uploadFile(testAppInfo)).file._attributes.file_id;
console.log('New File ID:', fileId);
const scanId = await veraClient.beginPrescan(testAppInfo).build.analysis_unit._attributes.build_id;
console.log('New Scan ID:', scanId);
To run the integration tests, you'll need a Veracode API id and secret. Follow the instructions on Veracode to obtain these credentials.
Once you have them, run this in your shell (with your id and secret substituted, of course):
export VERA_ID=YOUR_VERACODE_ID
export VERA_KEY=YOUR_VERACODE_SECRET
Now you'll be able to run the integration tests with yarn test:integration.
Not all functions are currently implemented. List of implemented functions:
| VeracodeClient method | API endpoint |
|---|---|
| getAppList | getapplist.do |
| getSandboxList | getsandboxlist.do |
| createSandbox | createsandbox.do |
| getBuildList | getbuildlist.do |
| getAppBuilds | getappbuilds.do |
| detailedReport | detailedreport.do |
| uploadFile | uploadfile.do |
| beginPrescan | beginprescan.do |
| createApp | createapp.do |
| createBuild | createbuild.do |
| getBuildInfo | getbuildinfo.do |
| deleteApp | deleteapp.do |
The createZipArchive() menthod is added to the client functionality for convenience
Example:
await veraClient.createZipArchive('/path/to/my/repo', 'target_archive_name.zip', [ 'node_modules/**/*' ]);
Only API ID and KEY authentication method supported
FAQs
JavaScript Veracode API client
The npm package @lifeomic/veracode-client-js receives a total of 79 weekly downloads. As such, @lifeomic/veracode-client-js popularity was classified as not popular.
We found that @lifeomic/veracode-client-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 52 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.