Skip to content

Commit

Permalink
Enable deep mode for poetry to use the piptree based dependency tree …
Browse files Browse the repository at this point in the history
…construction

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Oct 10, 2023
1 parent 691c5d4 commit f3ab36e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/repotests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ jobs:
with:
repository: 'fsprojects/FAKE'
path: 'repotests/dotnet-paket'
- uses: actions/checkout@v4
with:
repository: 'appthreat/blint'
path: 'repotests/blint'
- uses: dtolnay/rust-toolchain@stable
- name: repotests
run: |
Expand Down Expand Up @@ -178,6 +182,8 @@ jobs:
bin/cdxgen.js -r -t rust repotests/rs-validator -o bomresults/bom-rs-validator.json --validate
bin/cdxgen.js -r -t rust repotests/rs-axum -o bomresults/bom-rs-axum.json --validate
bin/cdxgen.js -p -r -t dotnet repotests/dotnet-paket -o bomresults/bom-dotnet-paket.json --validate
bin/cdxgen.js -p -t python repotests/blint -o bomresults/bom-blint.json
bin/cdxgen.js -p -t python repotests/blint -o bomresults/bom-blint-deep.json --deep
# mkdir -p jenkins
# wget https://updates.jenkins.io/download/plugins/sonar/2.14/sonar.hpi
# wget https://updates.jenkins.io/download/plugins/bouncycastle-api/2.26/bouncycastle-api.hpi
Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2321,8 +2321,10 @@ export const createPythonBom = async (path, options) => {
retMap.dependenciesList,
parentComponent
);
} else {
// Fallback to retrieving the tree using virtualenv
}
// Retrieve the tree using virtualenv in deep mode and as a fallback
// This is a slow operation
if (options.deep || !dependencies.length) {
retMap = getPipFrozenTree(basePath, f, tempDir);
if (retMap.pkgList && retMap.pkgList.length) {
pkgList = pkgList.concat(retMap.pkgList);
Expand Down

0 comments on commit f3ab36e

Please sign in to comment.