diff --git a/README.md b/README.md index 62f886e..b44173b 100644 --- a/README.md +++ b/README.md @@ -371,7 +371,6 @@ The Following inputs can be used as `step.with` keys | `docker_user` | String | $GITHUB_ACTOR | User to login to container registry | False | | `repo_name` | String | $GITHUB_REPOSITORY | The name of the repo/project | False | | `repo_sub_dir` | String | "" | Specify a subdirectory if build file not found in working root directory | False | -| `dependencies` | Bool | true | Set to false if action should not create materials for dependencies (e.g. if build tool is unsupported or repo uses internal/private dependencies) | False | | `build_started_on` | String | "event.(type if any).head.commit" | Specify a workflow build start time. Default is set to github_context e.g `event.head_commit` or `event.workflow_run.head_commit` depending on workflow | False | | `mvn_opts` | String | "" | A comma-delimited string with additional maven cli options for the dependence build | False | | `repo_dir` | String | $GITHUB_WORKSPACE | **Internal value (do not set):** Root of directory to look for build files | False | diff --git a/action.yml b/action.yml index 8da1fd6..1d94d0c 100644 --- a/action.yml +++ b/action.yml @@ -53,13 +53,6 @@ inputs: required: false default: "${{ github.actor }}" - dependencies: - description: |- - If salsa should generate materials for the provenance containing dependencies. - Defaults to true. - required: false - default: "true" - mvn_opts: description: |- A comma-delimited string with additional maven options. @@ -132,7 +125,6 @@ runs: - ${{ inputs.docker_user }} - ${{ inputs.github_token }} - ${{ inputs.token_key_pattern }} - - ${{ inputs.dependencies }} - ${{ inputs.build_started_on }} - ${{ inputs.registry_access_token }} - ${{ inputs.registry }} diff --git a/entrypoint.sh b/entrypoint.sh index 0427dae..4d2be26 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -92,7 +92,6 @@ scan() { --runner-context "$RUNNER" \ --env-context "$ENVS" \ --subDir "$INPUT_REPO_SUB_DIR" \ - --with-deps="$INPUT_DEPENDENCIES" \ --mvn-opts "$INPUT_MVN_OPTS" \ --build-started-on "$INPUT_BUILD_STARTED_ON" \ --remote-run diff --git a/pkg/commands/scan.go b/pkg/commands/scan.go index f836b6f..ceaebf1 100644 --- a/pkg/commands/scan.go +++ b/pkg/commands/scan.go @@ -28,8 +28,7 @@ var ( ) type ProvenanceConfig struct { - WithDependencies bool - BuildStartedOn string + BuildStartedOn string } var scanCmd = &cobra.Command{ @@ -51,17 +50,15 @@ var scanCmd = &cobra.Command{ log.Infof("prepare to scan path %s ...", workDir) deps := &build.ArtifactDependencies{} - if Config.WithDependencies { - generatedDeps, err := InitBuildTools(mvnOpts).DetectDeps(workDir) - if err != nil { - return fmt.Errorf("detecting dependecies: %v", err) - } - - if generatedDeps != nil { - deps = generatedDeps - } else { - log.Infof("no supported build files found for directory: %s, proceeding", workDir) - } + generatedDeps, err := InitBuildTools(mvnOpts).DetectDeps(workDir) + if err != nil { + return fmt.Errorf("detecting dependecies: %v", err) + } + + if generatedDeps != nil { + deps = generatedDeps + } else { + log.Infof("no supported build files found for directory: %s, proceeding", workDir) } contextEnvironment, err := vcs.ResolveBuildContext(&buildContext, &runnerContext, &envContext) @@ -124,7 +121,6 @@ func init() { scanCmd.Flags().StringVar(&buildContext, "build-context", "", "context of build tool") scanCmd.Flags().StringVar(&runnerContext, "runner-context", "", "context of runner") scanCmd.Flags().StringVar(&envContext, "env-context", "", "environmental variables of current context") - scanCmd.Flags().BoolVar(&Config.WithDependencies, "with-deps", true, "specify if the cli should generate dependencies for a provenance") scanCmd.Flags().StringVar(&mvnOpts, "mvn-opts", "", "pass additional Comma-delimited list of options to the maven build tool") scanCmd.Flags().StringVar(&Config.BuildStartedOn, "build-started-on", "", "set start time for the build") }