Skip to content

Commit c06c16a

Browse files
committed
more cli updates
1 parent dbd8897 commit c06c16a

2 files changed

Lines changed: 50 additions & 41 deletions

File tree

.gitlab-ci.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -83,48 +83,48 @@ SCA Test: # run SCA on any branch
8383
- dev
8484
- master
8585

86-
# SAST Sandbox Test: # this only runs on the dev branch, so run a Sandbox scan
87-
# stage: test
88-
#
89-
# tags:
90-
# - python
91-
#
92-
# script:
93-
# - zip project.zip
94-
# setup.* LICENSE.txt -r $(echo ${CI_PROJECT_NAME} | cut -d'-' -f1)
95-
# - pip3 install veracode-python
96-
#
97-
# - veracode-cli scan
98-
# --app="${CI_PROJECT_NAME}"
99-
# --name="$(date) - ${CI_COMMIT_SHORT_SHA}"
100-
# --sandbox='Development Build'
101-
# --files='project.zip'
102-
# --timeout=30
103-
#
104-
# only:
105-
# - dev
86+
SAST Sandbox Test: # this only runs on the dev branch, so run a Sandbox scan
87+
stage: test
88+
89+
tags:
90+
- python
91+
92+
script:
93+
- zip project.zip
94+
setup.* LICENSE.txt -r $(echo ${CI_PROJECT_NAME} | cut -d'-' -f1)
95+
- pip3 install veracode-python
96+
97+
- veracode app scan
98+
--app="${CI_PROJECT_NAME}"
99+
--name="$(date) - ${CI_COMMIT_SHORT_SHA}"
100+
--sandbox='Development Build'
101+
--files='project.zip'
102+
--timeout=30
103+
104+
only:
105+
- dev
106106

107107
############################## Master Only ####################################
108108

109-
# SAST Policy Test: # this is on master so run a SAST policy scan
110-
# stage: test
111-
#
112-
# tags:
113-
# - python
114-
#
115-
# script:
116-
# - zip project.zip
117-
# setup.* LICENSE.txt -r $(echo ${CI_PROJECT_NAME} | cut -d'-' -f1)
118-
# - pip3 install veracode-python
119-
#
120-
# - veracode-cli scan
121-
# --app="${CI_PROJECT_NAME}"
122-
# --name="$(date) - ${CI_COMMIT_SHORT_SHA}"
123-
# --files='project.zip'
124-
# --timeout=30
125-
#
126-
# only:
127-
# - master
109+
SAST Policy Test: # this is on master so run a SAST policy scan
110+
stage: test
111+
112+
tags:
113+
- python
114+
115+
script:
116+
- zip project.zip
117+
setup.* LICENSE.txt -r $(echo ${CI_PROJECT_NAME} | cut -d'-' -f1)
118+
- pip3 install veracode-python
119+
120+
- veracode app scan
121+
--app="${CI_PROJECT_NAME}"
122+
--name="$(date) - ${CI_COMMIT_SHORT_SHA}"
123+
--files='project.zip'
124+
--timeout=30
125+
126+
only:
127+
- master
128128

129129
Create Release: # increment version and create release tag
130130
stage: package

veracode/utils/report/commands.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
import click
2+
from veracode.application import Application
3+
from veracode.utils.report import display
24

35
@click.group()
46
def report():
57
pass
68

79
@report.command()
8-
def list():
9-
click.echo('list')
10+
@click.option('--app', '-a', required=True,
11+
help='Name of the application.')
12+
@click.option('--sandbox', '-s',
13+
help='Name of the application sandbox.')
14+
@click.option('--build', '-b',
15+
help='Name of the application build.')
16+
def summary(app, sandbox=None, build=None):
17+
app = Application(name=app, sandbox=sandbox, build=build)
18+
print(app.build.report)
1019

1120
@report.command()
1221
def create():

0 commit comments

Comments
 (0)