class Fastlane::Actions::DependencyCheckIosAnalyzerAction
Public Class Methods
available_options()
click to toggle source
# File lib/fastlane/plugin/dependency_check_ios_analyzer/actions/dependency_check_ios_analyzer_action.rb, line 47 def self.available_options [ FastlaneCore::ConfigItem.new( key: :skip_spm_analysis, description: 'Skip analysis of SPM dependencies', optional: true, default_value: false, is_string: false, type: Boolean ), FastlaneCore::ConfigItem.new( key: :skip_pods_analysis, description: 'Skip analysis of CocoaPods dependencies', optional: true, default_value: false, is_string: false, type: Boolean ), FastlaneCore::ConfigItem.new( key: :spm_checkouts_path, description: 'Path to Swift Packages, if resolved', optional: true, is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :pod_file_lock_path, description: 'Path to the Podfile.lock file, if exists', optional: true, is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :project_path, description: 'Path to the directory that contains an Xcode project, workspace or package. Defaults to root', optional: true, is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :project_name, description: "The project's name", optional: true, default_value: 'DependencyCheck', is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :output_directory, description: 'The directory in which all reports will be stored', optional: true, default_value: 'dependency-check', is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :output_types, description: 'Comma separated list of the output types (e.g. html, xml, csv, json, junit, sarif, all)', optional: true, default_value: 'sarif', is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :cli_version, description: 'Overwrite the version of DependencyCheck analyzer. Not recommended', optional: true, is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :verbose, description: 'The file path to write verbose logging information', optional: true, is_string: true, type: String ), FastlaneCore::ConfigItem.new( key: :fail_on_cvss, description: 'Specifies if the build should be failed if a CVSS score above a specified level is identified. ' \ 'Since the CVSS scores are 0-10, by default the build will never fail', optional: true, default_value: 11, is_string: false, type: Integer ), FastlaneCore::ConfigItem.new( key: :junit_fail_on_cvss, description: 'Specifies the CVSS score that is considered a failure when generating the junit report', optional: true, default_value: 0, is_string: false, type: Integer ), FastlaneCore::ConfigItem.new( key: :keep_binary_on_exit, description: 'Keep DependencyCheck binary and data on exit', optional: true, default_value: true, is_string: false, type: Boolean ) ] end
category()
click to toggle source
# File lib/fastlane/plugin/dependency_check_ios_analyzer/actions/dependency_check_ios_analyzer_action.rb, line 152 def self.category :testing end
description()
click to toggle source
Documentation #
# File lib/fastlane/plugin/dependency_check_ios_analyzer/actions/dependency_check_ios_analyzer_action.rb, line 29 def self.description 'Fastlane wrapper around the OWASP dependency-check iOS analyzers (Swift Package Manager and CocoaPods).' end
example_code()
click to toggle source
# File lib/fastlane/plugin/dependency_check_ios_analyzer/actions/dependency_check_ios_analyzer_action.rb, line 37 def self.example_code [ dependency_check_ios_analyzer( project_name: 'SampleProject', output_types: 'html, junit', fail_on_cvss: 3 ) ] end
is_supported?(platform)
click to toggle source
# File lib/fastlane/plugin/dependency_check_ios_analyzer/actions/dependency_check_ios_analyzer_action.rb, line 156 def self.is_supported?(platform) [:ios, :mac].include?(platform) end
on_exit(params:, result:)
click to toggle source
# File lib/fastlane/plugin/dependency_check_ios_analyzer/actions/dependency_check_ios_analyzer_action.rb, line 19 def self.on_exit(params:, result:) Helper::ConfigurationHelper.clean_up(params) say_goodbye = '✨ Check out the report for further investigation.' result ? UI.important(say_goodbye) : UI.user_error!(say_goodbye) end
run(params)
click to toggle source
# File lib/fastlane/plugin/dependency_check_ios_analyzer/actions/dependency_check_ios_analyzer_action.rb, line 9 def self.run(params) params[:output_types] = Helper::ConfigurationHelper.parse_output_types(params[:output_types]) bin_path = Helper::ConfigurationHelper.install(params) spm_analysis = Helper::AnalyzerHelper.analize_packages(bin_path: bin_path, params: params) pods_analysis = Helper::AnalyzerHelper.analize_pods(bin_path: bin_path, params: params) on_exit(params: params, result: (spm_analysis && pods_analysis)) end