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

minor updates to PR comments #55

Open
wants to merge 117 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
f6b8778
Update package.json
julz0815 May 29, 2022
d8ce4a0
Update package.json
julz0815 May 29, 2022
dc370eb
Update action.yml
julz0815 May 29, 2022
c1584f5
Update README.md
julz0815 May 29, 2022
57f9184
update readme
julz0815 Nov 8, 2022
1d25aa5
readme update
julz0815 Nov 8, 2022
dddfbbd
updates
julz0815 Nov 22, 2022
0860729
updates
julz0815 Nov 22, 2022
89f392f
updates
julz0815 Nov 22, 2022
980de47
updates
julz0815 Nov 22, 2022
db256bf
updates
julz0815 Nov 23, 2022
0c9cea1
updates
julz0815 Nov 23, 2022
0d1d03d
updates
julz0815 Nov 23, 2022
80d07a8
updates
julz0815 Nov 23, 2022
af80f05
updates
julz0815 Nov 23, 2022
d140279
updates
julz0815 Nov 23, 2022
60512b5
updates
julz0815 Nov 23, 2022
2e27ad5
updates
julz0815 Nov 23, 2022
9ba7d4a
updates
julz0815 Nov 23, 2022
a2ecb01
updates
julz0815 Nov 23, 2022
0c913fa
updates
julz0815 Nov 23, 2022
1e49cb8
updates
julz0815 Nov 23, 2022
9ce5d5a
updates
julz0815 Nov 23, 2022
f879661
updates
julz0815 Nov 23, 2022
6648092
updates
julz0815 Nov 25, 2022
860dcc1
updates
julz0815 Nov 25, 2022
1038324
add pr decoration
julz0815 Nov 26, 2022
2c868aa
update action
julz0815 Nov 26, 2022
e434ef1
updates
julz0815 Nov 26, 2022
923f53e
updates
julz0815 Nov 26, 2022
a8b9784
updates
julz0815 Nov 26, 2022
99f6d31
updates
julz0815 Nov 26, 2022
808dd9d
updates
julz0815 Nov 26, 2022
0027d10
updates
julz0815 Nov 26, 2022
461fe60
updates
julz0815 Nov 26, 2022
179c84c
updates
julz0815 Nov 26, 2022
24292b9
updates
julz0815 Nov 26, 2022
3b418d0
updates
julz0815 Nov 26, 2022
5e9a73a
updates
julz0815 Nov 27, 2022
5880363
updates
julz0815 Nov 27, 2022
652d88b
updates
julz0815 Nov 27, 2022
bcf6316
updates
julz0815 Nov 27, 2022
76c489a
updates
julz0815 Nov 27, 2022
cb102b9
updates
julz0815 Nov 27, 2022
75ff8f4
updates
julz0815 Nov 27, 2022
e3d7798
updates
julz0815 Nov 27, 2022
fd3a18f
updates
julz0815 Nov 27, 2022
c8debeb
updates
julz0815 Nov 27, 2022
ec5384a
updates
julz0815 Nov 27, 2022
06d860d
updates
julz0815 Nov 27, 2022
bf77dfa
updates
julz0815 Nov 27, 2022
1506910
updates
julz0815 Nov 27, 2022
4c9af9f
updates
julz0815 Nov 27, 2022
a2b40b0
updates
julz0815 Nov 27, 2022
e825a3f
updates
julz0815 Nov 27, 2022
a229635
updates
julz0815 Nov 27, 2022
2dd1903
updates
julz0815 Nov 27, 2022
d2ba46c
updatges
julz0815 Nov 27, 2022
ebfdc23
updates
julz0815 Nov 27, 2022
6c91f1e
UPDATES
julz0815 Nov 27, 2022
1c84a91
updates
julz0815 Nov 27, 2022
e7ed704
updates
julz0815 Nov 27, 2022
bc88387
updates
julz0815 Nov 27, 2022
04e3983
updates
julz0815 Nov 27, 2022
a49b6a6
updates
julz0815 Nov 27, 2022
006f450
updates
julz0815 Nov 27, 2022
338f8a5
updates
julz0815 Nov 27, 2022
b1971f4
add PR decoration
julz0815 Nov 27, 2022
72a4e12
Merge pull request #1 from veracode/updates
julz0815 Nov 27, 2022
b9a9372
update readme
julz0815 Nov 27, 2022
5decf3e
Merge pull request #2 from veracode/updates
julz0815 Nov 27, 2022
64b6bc8
update readme
julz0815 Nov 27, 2022
f8b5218
Merge pull request #3 from veracode/updates
julz0815 Nov 27, 2022
a860b9a
Update README.md
gmdavef Nov 28, 2022
7c936a9
Update README.md
gmdavef Nov 28, 2022
ca19291
Merge pull request #4 from gmdavef/main
julz0815 Nov 28, 2022
8ff1d2e
update skip-vms
julz0815 Nov 30, 2022
9ab4d63
readme update
julz0815 Nov 30, 2022
948a7d3
store json output
julz0815 Mar 5, 2023
d45bbd6
store results
julz0815 Mar 5, 2023
8a82695
fixed typo
julz0815 Mar 5, 2023
212082e
translpiled code
julz0815 Mar 5, 2023
c7605da
using correct entrypoint
julz0815 Mar 5, 2023
1fa5f0b
including node moduls
julz0815 Mar 5, 2023
0f25c80
store txt output
julz0815 Mar 5, 2023
4b87588
update readme
julz0815 Mar 5, 2023
8f68e02
Merge pull request #5 from veracode/storeAsArtefact
julz0815 Mar 5, 2023
382e324
fix readme typos
julz0815 Mar 5, 2023
92dae48
Merge pull request #6 from veracode/storeAsArtefact
julz0815 Mar 5, 2023
f9f2501
update readme
julz0815 Mar 5, 2023
f944fd0
Merge pull request #7 from veracode/storeAsArtefact
julz0815 Mar 5, 2023
66b09b2
add no-graphs option
julz0815 Jun 15, 2023
5ae79e0
add no-graphs option
julz0815 Jun 15, 2023
c4dc798
add no-graphs option
julz0815 Jun 15, 2023
f910b2a
Merge pull request #14 from veracode/noGraphs
julz0815 Jun 24, 2023
fe0c07e
Update README.md
julz0815 Jun 24, 2023
5101be1
add on PR, scheduled and on dispatch scanning
julz0815 Aug 4, 2023
21a3fef
add worflow name
julz0815 Aug 4, 2023
891230d
rename yml
julz0815 Aug 4, 2023
b134fbe
delete file
julz0815 Aug 4, 2023
f14f706
Create nigthlySecurityScan.yml
julz0815 Aug 4, 2023
f4887bd
Merge pull request #17 from veracode/addNightlyScanning
julz0815 Aug 4, 2023
9b71f8a
adjsut worflow
julz0815 Aug 4, 2023
a807c2c
update worflow
julz0815 Aug 4, 2023
d488450
Merge pull request #18 from veracode/addNightlyScanning
julz0815 Aug 4, 2023
5dd03d0
adjust workflow
julz0815 Aug 4, 2023
21a3ac2
Merge pull request #19 from veracode/addNightlyScanning
julz0815 Aug 4, 2023
779c65f
delete old yml
julz0815 Aug 4, 2023
91e3347
Merge pull request #20 from veracode/addNightlyScanning
julz0815 Aug 7, 2023
e9bc14f
Create SECURITY.md
mtawadrousv Nov 16, 2023
2b874ed
Merge pull request #22 from veracode/mtawadrousv-patch-1
tjarrettveracode Nov 16, 2023
e68cba2
Fix PR comments
julz0815 Jan 10, 2024
8d879c0
reformating PR comment
julz0815 Jan 10, 2024
ad6e259
remove missing logo from PR comments
julz0815 Jan 10, 2024
15c7210
fix logo on PR comments
julz0815 Jan 10, 2024
b22d1aa
change PR comment layout
julz0815 Jan 10, 2024
d8115ae
change PR comment layout
julz0815 Jan 10, 2024
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
47 changes: 47 additions & 0 deletions .github/workflows/nigthlySecurityScan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Veracode Security Scan

on:
pull_request:
branches:
- main
schedule:
- cron: 0 4 * * *
workflow_dispatch:

jobs:
veracode-sca-task:
runs-on: ubuntu-latest
name: Veracode SCA scan

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Veracode SCA
env:
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}
uses: veracode/[email protected]

veracode-sast-task:
runs-on: ubuntu-latest
name: Veracode SAST policy scan

steps:
- name: Checkout
uses: actions/checkout@v3
- name: create new package-lock.json
run: npm install
- name: ZIP source folder
run: zip -r app.zip src package-lock.json
- name: Run Veracode Policy scan
uses: veracode/[email protected]
with:
appname: 'GitHub SCA Action'
createprofile: false
filepath: 'app.zip'
scantimeout: 30
vid: '${{ secrets.API_ID }}'
vkey: '${{ secrets.API_KEY }}'




36 changes: 0 additions & 36 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ node_modules/
.env
.env.test

.DS_Store
src.zip
88 changes: 52 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
# Veracode Software Composition Analysis
Veracode Software Composition Analysis Scaning as a GitHub Action with the following actions:
- Run the Veracode SCA sca similar as the script in textual output mode
- Automatically create issues from Vulnerabilities based on given CVSS threshold
- Fail The action step based on given CVSS threshold
Veracode Software Composition Analysis (agent-based scan) as a GitHub Action with the following actions:
- Run the Veracode SCA similar as the script in textual output mode
- Ability to create issues for identified vulnerabilities without creating duplicates
- Ability to run the scan on a remote repository
- Ability to run the scan with the `--quick` flag


## Pull Request Decoration
If the action runs on a pull request, it will either add a comment with the scan output to the PR or it will automatically link all created GitHub issues to the PR. This will help your review process to see if the PR can be approved or not.

## Inputs
> :exclamation: You will need to provide `SRCCLR_API_TOKEN` as environment variables. (See examples below)

:exclamation: You will need to provide `SRCCLR_API_TOKEN` as an environment variable (see examples below).

:exclamation: If using an org-level agent, you will need to provide `SRCCLR_WORKSPACE_SLUG` as an environment variable.

## Artifacts
The run will store 2 different types of artifacts.
If `create-issues` is set to true the artifact will be the json output stored as `scaResults.json`.
If `create-issues` is set to false the artifact will be the text output stored as `scaResults.txt`.
For both the artifact name will be `Veracode Agent Based SCA Results`.

### `github_token`

**Required** - The authorization token to allow the action to create issues.

You may be able to simply can use the `${{ secrets.GITHUB_TOKEN }}` as a default option - see __[more details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)__

If the default value `${{ github.token }}` is not working, the token must be set on the action inputs.
You may be able to simply use `${{ secrets.GITHUB_TOKEN }}` as a default option - see __[more details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)__

Otherwise, you may be able create and assign __as secret__ a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and assign it with the required permissions (`repo` scope).

### `min-cvss-for-issue`
**Optional** - The minimum CVSS for creating an issue from a found vulnerability

Default Value: __0__

### `fail-on-cvss`
**Optional** - The maximum allowed cvss in found vulnerabilities to pass the step

Default Value: __10__
> The step will not fail unless you explicitly specify a lower CVSS value

Value: __0__

### `create-issues`
**Optional** - whether to create issues from found vulnerabilities
Expand All @@ -47,7 +46,7 @@ This attribute is useful in scenarios where the actual code is not in the root o
Default Value: __`.`__ (repository root folder)

### `quick`
__Optional__ - run the Veracode SCA scan with the `--quick`
__Optional__ - run the Veracode SCA scan with `--quick`

Default Value: __false__

Expand All @@ -69,12 +68,24 @@ Default Value: __false__
### `recursive`
__Optional__ - run the Veracode SCA scan with `--recursive`

Default Value: __false__

### `skip-vms`
__Optional__ - run the Veracode SCA scan with `--skip-vms`

Default Value: __false__

### `no-graphs`
__Optional__ - do not include dependency graphs in the JSON output.

Default Value: __false__

## Examples

### Scan your repository with textual output

Run a scan but do not create issues for identified vulnerabilities.

```yaml
on:
schedule:
Expand All @@ -84,24 +95,24 @@ on:
jobs:
veracode-sca-task:
runs-on: ubuntu-latest
name: Scan remote repository for Issues
name: Scan repository with Veracode SCA

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run Veracode SCA
env:
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}
uses: lerer/veracode-sca@v1.0.8
uses: veracode/veracode-sca@v2.1.10
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create-issues: false
fail-on-cvss: 1
create-issues: false
```

### Scan the repository
### Scan the local repository

Scan can the local repository. Fail the step and create issues if found vulnerability with CVSS greater than 1
Run a quick scan on the repository and create issues for all identified vulnerabilities.


```yaml
Expand All @@ -115,22 +126,20 @@ on:
jobs:
veracode-sca-task:
runs-on: ubuntu-latest
name: Scan repository for Issues
name: Scan repository with Veracode SCA

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run Veracode SCA
env:
SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }}
uses: lerer/[email protected]

uses: veracode/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
quick: true
create-issues: true
fail-on-cvss: 1
min-cvss-for-issue: 1
```
## User Interface

Expand All @@ -142,4 +151,11 @@ jobs:
### Individual Issue
<p align="center">
<img src="/media/issue.png" width="700px" alt="Individual issues ticket content"/>
</p>
</p>

## Compile the action
The action comes pre-compiled as transpiled JavaScript. If you want to fork and build it on your own you need NPM to be installed, use `ncc` to compile all node modules into a single file, so they don't need to be installed on every action run. The command to build is simply

```sh
ncc build ./src/action.ts
```
19 changes: 19 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Our Commitment to Security

Veracode was founded on the idea that companies should be able to access technology that allows them to scan their software for vulnerabilities so that they can identify them, fix them and improve their security. Since that time, we have created new technologies and services to enable our customers to scan for flaws in along the entire software development lifecycle, seeing results in seconds or minutes, to allow them to code securely while also remaining on schedule with continuous release cycles.

Veracode envisions a world where the software fueling our economic growth and solving society's greatest challenges is developed secure from the start.

We value transparency in the security industry and openness with sharing information that could improve security for every organization. Veracode is committed to engaging the research community in a professional, positive and agreeable manner that protects our company and our customers.

As such, we encourage and welcome anyone who believes he or she has identified a vulnerability to contact us with security concerns or pertinent information to the integrity, functionality or confidentiality of our software.

The terms below apply to any website, application or service distributed by or hosted by Veracode, Inc.

Please use the email address [**[email protected]**](mailto:[email protected]?subject=Responsible%20Disclosure%20Notice&body=URL(s)/Application(s)%20Impacted:%0A%0ASuspected%20Vulnerability%20Details:%0A%0ADescription%20of%20how%20the%20Vulnerability%20was%20found:%0A%0AContact%20Information:%0A%0AAny%20other%20relevant%20information:%0A%0A) to alert us to:

- Vulnerabilities or breaches in our software or environments which threaten the confidentiality, integrity or availability of our data, software, or services, or our customers’ data
- Applications that mimic, mislabel, misdirect, or "copycat" Veracode, or phishing attacks even if they do not originate from Veracode sources
- Written or verbal discussion, activities, or data in any public forum which you believe constitutes a threat to Veracode, our employees or our customers

For more, please refer to our [**Responsible Disclosure Policy**](https://www.veracode.com/legal-privacy/responsible-disclosure-policy)
25 changes: 13 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# action.yml
name: 'Veracode Software Composition Analysis'
name: 'Veracode Dependency Scanning'
description: 'An action to execute Veracode Agent-Based SCA and import findings as issues'
branding:
icon: 'play'
color: 'blue'
inputs:
github_token:
description: "Authorization token to query and create issues"
default: ${{ github.token }}
required: true
quick:
description: ""
description: "Run the SRCCLR with the `--quick` options"
required: false
default: "false"
update_advisor:
Expand All @@ -20,14 +21,6 @@ inputs:
description: "A git URL to work with in case the scan is not for the current repository"
required: false
default: ""
min-cvss-for-issue:
description: "The minimum CVSS value for vulnerability to be added as an issue"
required: false
default: "0"
fail-on-cvss:
description: "The maximum allowed cvss in found vulnerabilities to pass the step"
required: false
default: "10"
create-issues:
description: "An attribute to instruct the action to create an issue from found vulnerability or just simple text output"
required: false
Expand All @@ -52,6 +45,14 @@ inputs:
description: "Run the SRCCLR with the `--recursive` option"
required: false
default: "false"
skip-vms:
description: "Run the SRCCLR with the `--skip-vms` option"
required: false
default: "false"
no-graphs:
description: "Run the SRCCLR with the `--no-graphs` option"
required: false
default: "false"
runs:
using: 'node12'
main: 'dist/index.js'
using: 'node16'
main: 'dist/index.js'
Loading