ensure only the upload-sarif action can submit a status report with first_party_analysis=false

This commit is contained in:
nickfyson
2024-02-21 14:01:56 +00:00
parent a7dc229496
commit f32f0bf8e4
9 changed files with 77 additions and 23 deletions

View File

@@ -11,6 +11,7 @@ import {
getActionVersion,
getRequiredInput,
isFirstPartyAnalysis,
ActionName,
} from "./actions-util";
import { getAnalysisKey, getApiClient } from "./api-client";
import { EnvVar } from "./environment";
@@ -24,14 +25,6 @@ import {
DiskUsage,
} from "./util";
export type ActionName =
| "autobuild"
| "finish"
| "init"
| "init-post"
| "resolve-environment"
| "upload-sarif";
export type ActionStatus =
| "aborted" // Only used in the init Action, if init failed before initializing the tracer due to something other than a configuration error.
| "failure"
@@ -230,7 +223,7 @@ export async function createStatusReportBase(
action_version: getActionVersion(),
analysis_key,
commit_oid: commitOid,
first_party_analysis: isFirstPartyAnalysis(),
first_party_analysis: isFirstPartyAnalysis(actionName),
job_name: jobName,
job_run_uuid: jobRunUUID,
ref,