Skip to content

Commit 6c098b4

Browse files
authored
Updates for CLI release 1.2.0 and new authentication system (#2)
* Rebasing brad's changes in master into 1.2.0-rc1 * update to point to phylum-dev repo * enable tmate * disable tmate * WIP - fix json parsing for 1.2.0-rc2 * Update README.md * Update action.yml * enable tmate * disable tmate * cleanup
1 parent 98ed06a commit 6c098b4

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
eng_threshold: 0.6
3232
lic_threshold: 0.6
3333
aut_threshold: 0.6
34-
phylum_username: ${{ secrets.PHYLUM_USER }}
35-
phylum_password: ${{ secrets.PHYLUM_PASS }}
34+
phylum_token: ${{ secrets.PHYLUM_TOKEN }}
3635
```
3736
3837
### Supported lockfiles:
@@ -43,7 +42,7 @@ jobs:
4342
4443
### Requirements:
4544
- active Phylum account ([Register here](https://app.phylum.io/auth/registration))
46-
- repository secrets defined: PHYLUM_USER and PHYLUM_PASS
45+
- repository secret defined: PHYLUM_TOKEN (extracted from Phylum CLI configuration file "offline_access")
4746
- concrete package versions (only applicable for requirements.txt)
4847
- existing Phylum project for repository (`.phylum_project` must be present)
4948

action.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ inputs:
2222
aut_threshold:
2323
description: "Author risk score threshold value"
2424
required: true
25-
phylum_username:
26-
description: "Phylum username"
27-
required: true
28-
phylum_password:
29-
description: "Phylum password"
25+
phylum_token:
26+
description: "Phylum token"
3027
required: true
3128
phylum_version:
3229
description: "Phylum version"
@@ -38,10 +35,9 @@ runs:
3835
using: "composite"
3936
steps:
4037
- id: phylum-test
41-
uses: phylum-dev/install-phylum-latest-action@master
38+
uses: phylum-dev/install-phylum-latest-action@v1.3
4239
with:
43-
phylum_username: ${{ inputs.phylum_username }}
44-
phylum_password: ${{ inputs.phylum_password }}
40+
phylum_token: ${{ inputs.phylum_token }}
4541
phylum_version: ${{ inputs.phylum_version }}
4642

4743
- name: Check for existing project
@@ -103,8 +99,6 @@ runs:
10399
echo "[*] Analyzed ${{ steps.get-prtype.outputs.prtype }} under label ${PHYLUM_LABEL} and wrote results to ~/phylum_analysis.json"
104100
popd
105101
106-
# - name: Setup tmate session
107-
# uses: mxschmitt/action-tmate@v3
108102
109103
- name: python script analyze.py
110104
shell: bash
@@ -150,7 +144,6 @@ runs:
150144
with:
151145
issue-number: ${{ github.event.pull_request.number }}
152146
body: ${{ steps.get-comment-body.outputs.body }}
153-
# comment-author: 'Phylum[bot]'
154147

155148
- name: return 1 for risk analysis failure
156149
shell: bash

analyze.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,13 @@ def check_risk_scores(self, package_json):
334334
def build_issues_list(self, package_json, issue_flags: list):
335335
issues = list()
336336
pkg_issues = package_json.get("issues")
337-
pkg_vulns = package_json.get("vulnerabilities")
337+
# pkg_vulns = package_json.get("vulnerabilities")
338338

339-
if 'vul' in issue_flags:
340-
for vuln in pkg_vulns:
341-
risk_level = vuln.get("risk_level")
342-
title = vuln.get("title")
343-
issues.append(('VUL', risk_level,title))
339+
# if 'vul' in issue_flags:
340+
# for vuln in pkg_vulns:
341+
# risk_level = vuln.get("risk_level")
342+
# title = vuln.get("title")
343+
# issues.append(('VUL', risk_level,title))
344344

345345
for flag in issue_flags:
346346
for pkg_issue in pkg_issues:

0 commit comments

Comments
 (0)