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

Fixed gha to publish scan result on saas pcce #79

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions .github/workflows/twistlock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
- uses: ./twistlock
continue-on-error: true
with:
project: Titan-QA
consoleURL: https://twistlock.cloud.resideo.com
consoleURL: https://us-east1.cloud.twistlock.com/us-1-113032316
username: ${{ secrets.TEMP_TWISTCLI_USERNAME }}
password: ${{ secrets.TEMP_TWISTCLI_PASSWORD }}
env:
Expand Down
17 changes: 7 additions & 10 deletions twistlock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
- run: yarn install
- uses: resideo/actions/twistlock@master
with:
project: Titan-QA
consoleURL: https://twistlock.cloud.resideo.com
username: ${{ secrets.TWISTLOCK_USERNAME }}
password: ${{ secrets.TWISTLOCK_PASSWORD }}
consoleURL: https://us-east1.cloud.twistlock.com/us-1-113032316
username: ${{ secrets.TWISTLOCK_CLOUD_USERNAME }}
password: ${{ secrets.TWISTLOCK_CLOUD_PASSWORD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -46,10 +45,9 @@ jobs:
- run: yarn install
- uses: resideo/actions/twistlock@master
with:
project: Titan-QA
consoleURL: https://twistlock.cloud.resideo.com
username: ${{ secrets.TWISTLOCK_USERNAME }}
password: ${{ secrets.TWISTLOCK_PASSWORD }}
consoleURL: https://us-east1.cloud.twistlock.com/us-1-113032316
username: ${{ secrets.TWISTLOCK_CLOUD_USERNAME }}
password: ${{ secrets.TWISTLOCK_CLOUD_PASSWORD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -74,8 +72,7 @@ jobs:
- name: Run Twistlock
uses: resideo/actions/twistlock@master
with:
project: Titan-QA
consoleURL: https://twistlock.cloud.resideo.com
consoleURL: https://us-east1.cloud.twistlock.com/us-1-113032316
username: ${{ secrets.TEMP_TWISTCLI_USERNAME }}
password: ${{ secrets.TEMP_TWISTCLI_PASSWORD }}
image: node:14
Expand Down
3 changes: 0 additions & 3 deletions twistlock/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Twistlock
description: Run Twistlock

inputs:
project:
description: Specifies a target project
required: true
consoleURL:
description: Prisma Cloud Console's URL
required: true
Expand Down
1 change: 0 additions & 1 deletion twistlock/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ main(
password: core.getInput("password"),
token: core.getInput("twistToken"),
consoleUrl: core.getInput("consoleURL"),
project: core.getInput("project"),
repositoryPath:
core.getInput("repositoryPath") || process.env.GITHUB_WORKSPACE || ".",
image: core.getInput("image"),
Expand Down
5 changes: 0 additions & 5 deletions twistlock/src/twistlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export interface TwistlockRun {
password?: string;
token?: string;
consoleUrl: string;
project: string;
repositoryPath: string;
image: string;
githubComment: boolean;
Expand Down Expand Up @@ -83,7 +82,6 @@ interface DownloadCliParams {
password?: string;
token?: string;
consoleUrl: string;
project: string;
}

interface ScanRepositoryParams {
Expand All @@ -108,7 +106,6 @@ export function* setupCli({
password,
token,
consoleUrl,
project,
}: DownloadCliParams): Generator<any, SetupCliReturn, any> {
if (!token) {
if (!user || !password)
Expand Down Expand Up @@ -143,7 +140,6 @@ export function* setupCli({
console.log("::group::scan");
const twistCommand = !image
? `${cliPath} coderepo scan ` +
`--project "${project}" ` +
`--address "${consoleUrl}" ` +
`--user "${user}" ` +
`--password "${password}" ` +
Expand All @@ -159,7 +155,6 @@ export function* setupCli({
`--output-file "${output.path}" ` +
`${repositoryPath}`
: `${cliPath} images scan ` +
`--project "${project}" ` +
`--address "${consoleUrl}" ` +
`--user "${user}" ` +
`--password "${password}" ` +
Expand Down
Loading