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

Bruk enturs bygg-orber #12

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
25 changes: 15 additions & 10 deletions src/@orb.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
version: 2.1

description: |
An orb for running OWASP vulnerability checks through command-line or tasks configured in Gradle and Maven builds.
An orb for running OWASP vulnerability checks through command-line or
tasks configured in Gradle and Maven builds.
Reports are persisted as artifacts under the directory 'Report/OWASP'.
Source: https://github.com/entur/owasp-orb
For Gradle and Maven, additional dependency caching is available for
improved run times.
Source: https://github.com/entur/owasp-orb.

examples:
gradle:
Expand Down Expand Up @@ -55,8 +58,8 @@ examples:
arguments: "--scan ./ --failOnCVSS 7 --suppression ./dependency-check-suppressions.xml"

orbs:
gradle: circleci/gradle@1.0.11
maven: circleci/maven@0.0.11
gradle: entur/gradle-orb@dev:testing
maven: entur/maven-orb@dev:testing
Copy link
Contributor

@Pavloro Pavloro Apr 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the version should be changed. You can use latest or specify version.
look for examples:
https://circleci.com/docs/2.0/using-orbs/#semantic-versioning-in-orbs


executors:
default:
Expand Down Expand Up @@ -92,23 +95,24 @@ aliases:
steps:
- checkout
- gradle/with_cache:
cache_key: << parameters.cache_key >>
steps:
- generate_cache_keys:
cache_key: gradle-<< parameters.cache_key >>-cache-key-v6
cache_key: gradle-owasp-<< parameters.cache_key >>-cache-key-v6
- restore_owasp_cache
- run:
name: Update OWASP Dependency-Check Database
command: ./gradlew dependencyCheckUpdate --info
command: ./gradlew dependencyCheckUpdate --info --no-daemon
- store_owasp_cache:
cve_data_directory: <<parameters.cve_data_directory>>
- run:
name: Run OWASP Dependency-Check Analyzer
command: ./gradlew <<parameters.task>> --info
command: ./gradlew <<parameters.task>> --info --no-daemon
- run:
# note: Also run purge so so that vulernability data is not cached twice.
# Run in seperate step so not run for each submodule.
name: OWASP Dependency-Check cache cleanup
command: ./gradlew dependencyCheckPurge --info
command: ./gradlew dependencyCheckPurge --info --no-daemon
- collect_reports:
persist_to_workspace: <<parameters.persist_to_workspace>>

Expand Down Expand Up @@ -291,9 +295,10 @@ jobs:
- checkout
- maven/with_cache:
settings_file: << parameters.settings_file >>
cache_key: << parameters.cache_key >>
steps:
- generate_cache_keys:
cache_key: maven-<< parameters.cache_key >>-cache-key-v6
cache_key: maven-owasp-<< parameters.cache_key >>-cache-key-v6
- restore_owasp_cache
- run:
name: Update OWASP Dependency-Check Database
Expand Down Expand Up @@ -347,7 +352,7 @@ jobs:
cache_key: << parameters.cache_key >>
steps:
- generate_cache_keys:
cache_key: commmandline-<< parameters.cache_key >>-cache-key-v6
cache_key: commmandline-owasp-<< parameters.cache_key >>-cache-key-v6
- restore_owasp_cache
- run:
name: Update OWASP Dependency-Check Database
Expand Down