forked from elastic/ml-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script and config for FOSSA scanning (elastic#1370)
FOSSA will check that we are only using code with approved licenses.
- Loading branch information
1 parent
68e7bf2
commit 7973c97
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli) | ||
# Visit https://fossa.com to learn more | ||
|
||
version: 2 | ||
cli: | ||
server: https://app.fossa.com | ||
fetcher: custom | ||
project: git@github.com:elastic/ml-cpp.git | ||
analyze: | ||
modules: | ||
- name: 3rd_party/licenses | ||
type: raw | ||
target: 3rd_party/licenses | ||
- name: 3rd_party/rapidjson/include/rapidjson | ||
type: raw | ||
target: 3rd_party/rapidjson/include/rapidjson | ||
- name: include/api | ||
type: raw | ||
target: include/api | ||
- name: include/core | ||
type: raw | ||
target: include/core | ||
- name: include/maths | ||
type: raw | ||
target: include/maths | ||
- name: include/model | ||
type: raw | ||
target: include/model | ||
- name: include/ver | ||
type: raw | ||
target: include/ver | ||
- name: include/seccomp | ||
type: raw | ||
target: include/seccomp | ||
- name: lib/api | ||
type: raw | ||
target: lib/api | ||
- name: lib/core | ||
type: raw | ||
target: lib/core | ||
- name: lib/maths | ||
type: raw | ||
target: lib/maths | ||
- name: lib/model | ||
type: raw | ||
target: lib/model | ||
- name: lib/ver | ||
type: raw | ||
target: lib/ver | ||
- name: lib/seccomp | ||
type: raw | ||
target: lib/seccomp | ||
- name: bin/autodetect | ||
type: raw | ||
target: bin/autodetect | ||
- name: bin/categorize | ||
type: raw | ||
target: bin/categorize | ||
- name: bin/controller | ||
type: raw | ||
target: bin/controller | ||
- name: bin/normalize | ||
type: raw | ||
target: bin/normalize | ||
- name: bin/data_frame_analyzer | ||
type: raw | ||
target: bin/data_frame_analyzer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License; | ||
# you may not use this file except in compliance with the Elastic License. | ||
# | ||
|
||
# Run a FOSSA scan on the repo to check for license violations | ||
|
||
# Get the FOSSA API token from Vault | ||
set +x | ||
export VAULT_TOKEN=$(vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") | ||
unset VAULT_ROLE_ID VAULT_SECRET_ID | ||
export FOSSA_API_KEY=$(vault read -field=token secret/jenkins-ci/fossa/api-token) | ||
unset VAULT_TOKEN | ||
set -x | ||
|
||
# Change directory to the top level of the repo | ||
readonly GIT_TOPLEVEL=$(git rev-parse --show-toplevel 2> /dev/null) | ||
cd "$GIT_TOPLEVEL" | ||
|
||
# Run the FOSSA scan | ||
fossa analyze | ||
|