Skip to content

Commit

Permalink
chore(COD-2736): remove the remaining SAST-related code
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydubreil committed Apr 15, 2024
1 parent 9debe24 commit a819a42
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 43 deletions.
1 change: 0 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
uses: ./../action
with:
target: push
tools: sca,sast
sources: ${{ github.workspace }}
debug: true
- name: Check run succeeded
Expand Down
8 changes: 0 additions & 8 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,13 @@ runs:
echo "LACEWORK_CONTEXT_ID=$(echo $LACEWORK_CONTEXT_ID)" >> $GITHUB_ENV
echo "LACEWORK_ACTION_REF=$(echo $LACEWORK_ACTION_REF)" >> $GITHUB_ENV
SCA_VERSION=0.1.2
SAST_VERSION=0.0.71
curl https://raw.githubusercontent.com/lacework/go-sdk/main/cli/install.sh | bash
KEY="$(date +'%Y-%m-%d')"
KEY="$KEY-$RUNNER_OS-$RUNNER_ARCH"
if [[ $TOOLS == *"sca"* ]]; then
KEY="$KEY-sca-$SCA_VERSION"
echo "sca-version=$SCA_VERSION" >> $GITHUB_OUTPUT
fi
if [[ $TOOLS == *"sast"* ]]; then
KEY="$KEY-sast-$SAST_VERSION"
echo "sast-version=$SAST_VERSION" >> $GITHUB_OUTPUT
fi
HASH="$(echo $KEY | md5sum | head -c 8)"
echo "cache-key=$HASH" >> $GITHUB_OUTPUT
- id: cache
Expand All @@ -104,9 +99,6 @@ runs:
if [[ "${{ steps.init.outputs.sca-version }}" != "" ]]; then
lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca --version "${{ steps.init.outputs.sca-version }}"
fi
if [[ "${{ steps.init.outputs.sast-version }}" != "" ]]; then
lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sast --version "${{ steps.init.outputs.sast-version }}"
fi
echo "::endgroup::"
echo "::group::Printing Lacework CLI information"
lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" version
Expand Down
34 changes: 0 additions & 34 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
import { downloadKeys, trustedKeys } from './keys'

const scaSarifReport = 'scaReport/output.sarif'
const sastReport = 'sast.sarif'
const scaReport = 'sca.sarif'
const scaLWJSONReport = 'scaReport/output-lw.json'
const scaDir = 'scaReport'
Expand Down Expand Up @@ -52,32 +51,6 @@ async function runAnalysis() {
appendFileSync(getRequiredEnvVariable('GITHUB_ENV'), `LACEWORK_TOOLS=${tools.join(',')}\n`)
const indirectDeps = getInput('eval-indirect-dependencies')
const toUpload: string[] = []
if (tools.includes('sast') && !tools.includes('sca')) {
var args = [
'sca',
'scan',
'.',
'--save-results',
'-o',
scaDir,
'--formats',
'sarif,lw-json',
'--deployment',
'ci',
'--fast',
'--keyring',
trustedKeys,
'--no-eval',
'--no-license',
'--no-scr',
]
if (debug()) {
args.push('--debug')
}
await callLaceworkCli(...args)
await printResults('sast', sastReport)
toUpload.push(sastReport)
}
if (tools.includes('sca')) {
await downloadKeys()
// command to print both sarif and lwjson formats
Expand Down Expand Up @@ -145,13 +118,6 @@ async function displayResults() {
`results-new/${scaReport}`
)
}
if (existsSync(`results-old/${sastReport}`) && existsSync(`results-new/${sastReport}`)) {
issuesByTool['sast'] = await compareResults(
'sast',
`results-old/${sastReport}`,
`results-new/${sastReport}`
)
}
const commentStart = Date.now()
if (Object.values(issuesByTool).some((x) => x.length > 0) && getInput('token').length > 0) {
info('Posting comment to GitHub PR as there were new issues introduced:')
Expand Down

0 comments on commit a819a42

Please sign in to comment.