Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE - Project Sierra - Code refactor for rebanding #247

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Synopsys Action
# Black Duck Security Action

![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/synopsys-sig/synopsys-action?color=blue&label=Latest%20Version&sort=semver)

Synopsys Action allows you to integrate Static Analysis Security Testing (SAST) and Software Composition Analysis (SCA) into your CI/CD pipelines.
Synopsys Action leverages Synopsys Bridge, a foundational piece of technology that has built-in knowledge of how to run all major Synopsys security testing solutions, plus common workflows for platforms like GitHub.
Black Duck Security Action allows you to integrate Static Analysis Security Testing (SAST) and Software Composition Analysis (SCA) into your CI/CD pipelines. Black Duck Security Action leverages Bridge-CLI, a foundational piece of technology that has built-in knowledge of how to run all major Synopsys security testing solutions, plus common workflows for platforms like GitHub.

To use Synopsys Action, please follow the steps below:
To use Black Duck Security Action, please follow the steps below:

1. Configure GitHub as described in the [GitHub Prerequisites](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_github-prerequisites.html) page.
2. Install and configure Synopsys Action for the Synopsys product you are using. <br/>
2. Install and configure Black Duck Security Action for the Synopsys product you are using. <br/>
[Polaris](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_github-polaris.html) <br/>
[Black Duck](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_github-blackduck.html) <br/>
[Coverity](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_github-coverity.html) <br/>
3. For additional configuration options, visit the [Additional GitHub Configuration](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_additional-github-parameters.html) page.

As an alternative to Synopsys Action, you also have the option to use Synopsys Bridge CLI. <br/>
Detailed documentation for Synopsys Bridge CLI can be found [here](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_overview.html).
As an alternative to Black Duck Security Action, you also have the option to use Black Duck Bridge CLI. <br/>
Detailed documentation for Black Duck Bridge CLI can be found [here](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_overview.html).
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: 'Synopsys Action'
name: 'Black Duck Security Action'
branding:
icon: 'shield'
color: 'purple'
description: 'Find and fix software weaknesses and vulnerabilities during development, before you ship or deploy!'
author: 'Synopsys Inc'
author: 'Black Duck Software, Inc.'
inputs:
coverity_url:
description: 'Coverity url'
Expand Down
1,498 changes: 759 additions & 739 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "synopsys-action",
"name": "blackduck-security-action",
"version": "1.12.0",
"private": true,
"description": "Perform security scan using Synopsys Tools",
"description": "Perform security scan using Blackduck Tools",
"main": "lib/main.js",
"scripts": {
"build": "tsc",
Expand All @@ -21,7 +21,7 @@
"url": "git+https://github.com/synopsys-sig/synopsys-action.git"
},
"keywords": [],
"author": "Synopsys Inc.",
"author": "Black Duck Software, Inc.",
"license": "Apache 2.0",
"bugs": {
"url": "https://github.com/synopsys-sig/synopsys-action/issues"
Expand Down
24 changes: 21 additions & 3 deletions src/application-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const SYNOPSYS_BRIDGE_DEFAULT_PATH_WINDOWS = '\\synopsys-bridge'
export const SYNOPSYS_BRIDGE_DEFAULT_PATH_LINUX = '/synopsys-bridge'
export const SYNOPSYS_BRIDGE_ARTIFACTORY_URL = 'https://sig-repo.synopsys.com/artifactory/bds-integrations-release/com/synopsys/integration/synopsys-bridge/'

export const APPLICATION_NAME = 'synopsys-action'
export const APPLICATION_NAME = 'blackduck-security-action'

export const SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = 'synopsys_bridge_install_directory'
/**
Expand Down Expand Up @@ -167,10 +167,28 @@ export const GITHUB_ENVIRONMENT_VARIABLES = {
GITHUB_SHA: 'GITHUB_SHA',
GITHUB_API_URL: 'GITHUB_API_URL'
}
export const GITHUB_TOKEN_VALIDATION_SARIF_UPLOAD_ERROR = 'Missing required GitHub token for uploading SARIF report to GitHub Advanced Security'
export const SARIF_REPORT_LOG_INFO_FOR_PR_SCANS = 'SARIF report create/upload is ignored for pull request scan'
export const POLARIS_PR_COMMENT_LOG_INFO_FOR_NON_PR_SCANS = 'Polaris PR Comment is ignored for non pull request scan'
export const COVERITY_PR_COMMENT_LOG_INFO_FOR_NON_PR_SCANS = 'Coverity PR Comment is ignored for non pull request scan'
export const BLACKDUCK_PR_COMMENT_LOG_INFO_FOR_NON_PR_SCANS = 'Black Duck PR Comment is ignored for non pull request scan'
export const BLACKDUCK_FIXPR_LOG_INFO_FOR_PR_SCANS = 'Black Duck Fix PR is ignored for pull request scan'
export const MISSING_GITHUB_TOKEN_FOR_FIX_PR_AND_PR_COMMENT = 'Missing required github token for fix pull request/pull request comments/Github Badges'
export const GITHUB_TOKEN_VALIDATION_SARIF_UPLOAD_ERROR = 'Missing required GitHub token for uploading SARIF report to GitHub Advanced Security'
export const MISSING_GITHUB_TOKEN_FOR_FIX_PR_AND_PR_COMMENT_ERROR = 'Missing required github token for fix pull request/pull request comments/Github Badges'
export const BRIDGE_VERSION_NOT_FOUND_ERROR = 'Provided Bridge version not found in artifactory'
export const BRIDGE_URL_NOT_VALID_OS_ERROR = 'Provided Bridge url is not valid for the configured '
export const BRIDGE_URL_NOT_VALID_ERROR = 'Invalid URL'
export const PROVIDED_BRIDGE_URL_EMPTY_ERROR = 'Provided Bridge URL cannot be empty '
export const BRIDGE_URL_EMPTY_ERROR = 'URL cannot be empty'
export const BRIDGE_EXECUTABLE_NOT_FOUND_ERROR = 'Bridge executable could not be found at '
export const BRIDGE_INSTALL_DIRECTORY_NOT_FOUND_ERROR = 'Bridge install directory does not exist'
export const BRIDGE_DEFAULT_DIRECTORY_NOT_FOUND_ERROR = 'Bridge default directory does not exist'
export const SCAN_TYPE_REQUIRED_ERROR = 'Requires at least one scan type: ({0},{1},{2},{3})'
export const BRIDGE_ZIP_NOT_FOUND_FOR_EXTRACT_ERROR = 'File does not exist'
export const BRIDGE_EXTRACT_directory_NOT_FOUND_ERROR = 'No destination directory found'
export const BRIDGE_DOWNLOAD_RETRY_ERROR = 'max attempts should be greater than or equal to 1'
export const INVALID_VALUE_ERROR = 'Invalid value for '
export const MISSING_BOOLEAN_VALUE_ERROR = 'Missing boolean value for '
export const PROVIDED_BLACKDUCKSCA_FAILURE_SEVERITIES_ERROR = 'Provided value is not valid - BLACKDUCK_SCAN_FAILURE_SEVERITIES'
export const SARIF_GAS_API_RATE_LIMIT_FOR_ERROR = 'GitHub API rate limit has been exceeded, retry after {0} minutes.'
export const SARIF_GAS_UPLOAD_FAILED_ERROR = 'Uploading SARIF report to GitHub Advanced Security failed: '
export const SARIF_FILE_NO_FOUND_FOR_UPLOAD_ERROR = 'No SARIF file found to upload'
Loading
Loading