-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
avikstroem
committed
Jul 7, 2023
1 parent
82c93d3
commit 4b38fe6
Showing
4 changed files
with
40 additions
and
10 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
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
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,2 @@ | ||
ignore_ids: | ||
- "GHSA-8r8j-xvfj-36f9" |
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Preparing system test..." | ||
THIS_DIR="$(dirname "$0")" | ||
pushd "${THIS_DIR}" &> /dev/null || exit 1 | ||
VENV=$(mktemp --directory) | ||
python -m venv "${VENV}" | ||
. "${VENV}/bin/activate" | ||
"${VENV}/bin/python3" -m pip install --quiet --upgrade pip | ||
"${VENV}/bin/python3" -m pip install --quiet --editable "$(git rev-parse --show-toplevel)" || exit 1 | ||
OUTPUT_FILE=$(mktemp) | ||
|
||
echo "Executing system test..." | ||
security-constraints --config="sc-conf.yaml" --output="${OUTPUT_FILE}" || exit 1 | ||
|
||
echo "Verifying that ID from config was ignored..." | ||
test -z "$(grep --files-with-match "(ID: GHSA-8r8j-xvfj-3fff6f9)" "${OUTPUT_FILE}" )" || exit 1 | ||
echo "Verifying that pip install works with the output file..." | ||
"${VENV}/bin/python3" -m pip install --quiet --dry-run ymlref --constraint="${OUTPUT_FILE}" || exit 1 | ||
|
||
popd &> /dev/null || exit 1 | ||
|
||
echo "System test passed!" |