|
| 1 | +name: 'CodeLogic Java Agent' |
| 2 | +description: 'Scans Java artifacts into your ' |
| 3 | +inputs: |
| 4 | + version: |
| 5 | + description: 'The version of the agent docker image to use. Default is latest.' |
| 6 | + default: "latest" |
| 7 | + required: false |
| 8 | + codelogic_host: |
| 9 | + description: 'The host address of the CodeLogic instance without the "/codelogic/ui/" part.' |
| 10 | + required: true |
| 11 | + agent_uuid: |
| 12 | + description: 'The UUID of the Agent in CodeLogic.' |
| 13 | + required: true |
| 14 | + agent_password: |
| 15 | + description: 'The password for the agent.' |
| 16 | + required: true |
| 17 | + application_name: |
| 18 | + description: 'The Application node to create that will be the parent of all objects found in the scan.' |
| 19 | + required: true |
| 20 | + scan_space: |
| 21 | + description: 'The name of the scan space that the data will be saved to. |
| 22 | + If specified, a ScanSpace with this name will be created if not found. |
| 23 | + If not specified, information will be saved to the default ScanSpace.' |
| 24 | + required: false |
| 25 | + scan_path: |
| 26 | + description: 'A comma-separated list of files and folders to scan. Must start with /github/workspace/' |
| 27 | + default: "/github/workspace" |
| 28 | + required: false |
| 29 | + scan_path_depth: |
| 30 | + description: 'During scanning, this value will be used as the depth of subdirectories to traverse before stopping.' |
| 31 | + default: '1' |
| 32 | + required: false |
| 33 | + recursive_filter: |
| 34 | + description: 'A comma-separated list of substrings to key off of to trigger recursive analysis (jar within jar).' |
| 35 | + required: false |
| 36 | + method_filter: |
| 37 | + description: 'A comma-separated list of Java package prefixes that should be included in method-invokes-method relationships.' |
| 38 | + required: false |
| 39 | + database_identities: |
| 40 | + description: 'A comma-separated list of database identities to use in the creation of relationships.' |
| 41 | + required: false |
| 42 | + force_rescan: |
| 43 | + description: 'Forces jCape to rescan already scanned artifacts.' |
| 44 | + default: 'false' |
| 45 | + required: false |
| 46 | + expunge_scan_sessions: |
| 47 | + description: 'Instruct the server to delete all other scan sessions created by this agent and its configuration after the current scan session has completed successfully.' |
| 48 | + default: 'false' |
| 49 | + required: false |
| 50 | + java_opts: |
| 51 | + description: 'Java options to pass to the java command.' |
| 52 | + required: false |
| 53 | + |
| 54 | +runs: |
| 55 | + using: 'docker' |
| 56 | + image: ${{ format('docker://public.ecr.aws/codelogic.com/codelogic_java:{0}', inputs.version) }} |
| 57 | + args: [ |
| 58 | + "analyze", |
| 59 | + "-t scan", |
| 60 | + "-p ${{ inputs.scan_path }}", |
| 61 | + "-a ${{ inputs.application_name }}", |
| 62 | + "${{ inputs.scan_space != null && format('-s {0}', inputs.scan_space) || '' }}", |
| 63 | + "${{ inputs.recursive_filter != null && format('-r {0}', inputs.recursive_filter) || '' }}", |
| 64 | + "${{ inputs.method_filter != null && format('-m {0}', inputs.method_filter) || '' }}", |
| 65 | + "${{ inputs.database_identities != null && format('-d {0}', inputs.database_identities) || '' }}", |
| 66 | + "${{ inputs.force_rescan == 'true' && '--rescan' || '' }}", |
| 67 | + "${{ inputs.expunge_scan_sessions == 'true' && '-e' || '' }}" |
| 68 | + ] |
| 69 | + env: |
| 70 | + CODELOGIC_HOST: ${{ inputs.codelogic_host }} |
| 71 | + AGENT_UUID: ${{ inputs.agent_uuid }} |
| 72 | + AGENT_PASSWORD: ${{ inputs.agent_password }} |
| 73 | + SCAN_PATH_DEPTH: ${{ inputs.scan_path_depth }} |
| 74 | + JAVA_OPTS: ${{ inputs.java_opts }} |
| 75 | + |
0 commit comments