diff --git a/action.yaml b/action.yaml index 8bf56822..963d01c4 100644 --- a/action.yaml +++ b/action.yaml @@ -86,7 +86,7 @@ runs: cd ../lacework-code-security HUSKY=0 npm install npm run compile - yq -i -o yaml 'del(.runs.steps) | del(.outputs) | .runs.using="node16" | .runs.main="dist/src/index.js" | .runs.post="dist/src/post.js"' action.yaml + yq -i -o yaml 'del(.runs.steps) | del(.outputs) | .runs.using="node16" | .runs.main="dist/src/index.js"' action.yaml - id: run-analysis uses: './../lacework-code-security' with: diff --git a/src/lw-json.ts b/src/lw-json.ts deleted file mode 100644 index 82625e29..00000000 --- a/src/lw-json.ts +++ /dev/null @@ -1,42 +0,0 @@ -export interface LWJSON { - FixSuggestions?: FixSuggestion[] -} - -export interface NextNode { - Version: string - Severity?: string - CVE?: string -} - -export interface SortedVersionGraphNode { - Version: string - Edges?: NextNode[] -} - -export interface VersionGraphStruct { - NodeCnt?: number - EdgeCnt?: number - ExtraAthenaCalls?: number - VersionGraph?: NextNode[] -} - -export interface FixInfo { - FixVersion: FixVersion - Kind?: string -} - -export interface FixSuggestionInfo { - Recommendations?: FixInfo[] - VersionGraphInfo?: VersionGraphStruct -} - -export interface FixSuggestion { - Id: string - Info: FixSuggestionInfo - AffectedArtifactId: string -} - -export interface FixVersion { - Type?: string - Version?: string -} diff --git a/src/post.ts b/src/post.ts deleted file mode 100644 index b4a8aed0..00000000 --- a/src/post.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { info, warning } from '@actions/core' -import { context } from '@actions/github' -import { getActionsApi } from './actions' -import { getOptionalEnvVariable, getRequiredEnvVariable } from './util' - -async function main() { - if (getOptionalEnvVariable('LACEWORK_WROTE_TELEMETRY', 'false') !== 'true') { - info("Telemetry wasn't previous reported") - - const run = await getActionsApi().getWorkflowRunAttempt({ - ...context.repo, - run_id: parseInt(getRequiredEnvVariable('GITHUB_RUN_ID')), - attempt_number: parseInt(getRequiredEnvVariable('GITHUB_RUN_NUMBER')), - }) - - info(`Run status: ${run.data.status}`) - if (run.data.status === 'cancelled') { - info('Run does was cancelled, not reporting telemetry') - return - } - - info('Reporting unknown failure') - } else { - info('Telemetry has been reported previously') - } -} - -main().catch((e) => { - warning(`Failed to report telemetry: ${e.message}`) -})