fastlane-plugin-seclane 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 784dd68429a97b3d8e10a7a2641850c3061d9fd15c5519f2f8b284f3cd6c3911
|
|
4
|
+
data.tar.gz: 16e2bf24282d861bf7b68453a41223d493aaff3098affdd9bcc06fa1cee4adff
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 4e27c5fd15088c5fab4159eb4da6bab220dd67129ce2fbace7e7070ab315d89e59b65590c45709a2963c2951f4f1bbbde926e872df3d5c50455821294bbac54e
|
|
7
|
+
data.tar.gz: 63c04aff74bdd23d9291c346f1574339420798f61e0b6b0d2e25ccb779d5fdf8bd9e4f21128a75bfe94036541310764ebd9e5f00aa7334a086a9903935dee4ff
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
require "seclane"
|
|
2
|
+
|
|
3
|
+
module Fastlane
|
|
4
|
+
module Actions
|
|
5
|
+
class SeclaneScanAction < Action
|
|
6
|
+
def self.run(params)
|
|
7
|
+
config = ::Seclane::Configuration.new(
|
|
8
|
+
platform: params[:platform],
|
|
9
|
+
scan_mode: params[:scan_mode],
|
|
10
|
+
base_branch: params[:base_branch],
|
|
11
|
+
severity_threshold: params[:severity_threshold],
|
|
12
|
+
fail_on_severity: params[:fail_on_severity],
|
|
13
|
+
fail_on_count: params[:fail_on_count],
|
|
14
|
+
custom_patterns: params[:custom_patterns],
|
|
15
|
+
exclude_patterns: params[:exclude_patterns],
|
|
16
|
+
disabled_rules: params[:disabled_rules],
|
|
17
|
+
disabled_categories: params[:disabled_categories],
|
|
18
|
+
output_format: params[:output_format],
|
|
19
|
+
config_file: params[:config_file]
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
scanner = ::Seclane::Scanner.new(config)
|
|
23
|
+
scanner.run
|
|
24
|
+
|
|
25
|
+
report = scanner.report
|
|
26
|
+
UI.message(report)
|
|
27
|
+
|
|
28
|
+
findings = scanner.filtered_findings
|
|
29
|
+
Actions.lane_context[SharedValues::SECLANE_FINDINGS_COUNT] = findings.length
|
|
30
|
+
Actions.lane_context[SharedValues::SECLANE_REPORT] = report
|
|
31
|
+
|
|
32
|
+
if scanner.failed?
|
|
33
|
+
UI.user_error!("Seclane found #{findings.length} secret(s) meeting the failure threshold")
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
findings.length
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.description
|
|
40
|
+
"Scans Android and iOS app codebases for secrets and tokens"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.authors
|
|
44
|
+
["Seclane by Cluelane"]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.return_value
|
|
48
|
+
"The number of findings that met the severity threshold"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def self.details
|
|
52
|
+
"Uses git diff to detect changed files and scans them for hardcoded secrets, API keys, tokens, private keys, and other sensitive data. Supports Android and iOS specific patterns."
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def self.available_options
|
|
56
|
+
[
|
|
57
|
+
FastlaneCore::ConfigItem.new(
|
|
58
|
+
key: :platform,
|
|
59
|
+
env_name: "SECLANE_PLATFORM",
|
|
60
|
+
description: "Target platform: 'android', 'ios', 'flutter', 'react_native'",
|
|
61
|
+
optional: false,
|
|
62
|
+
type: String,
|
|
63
|
+
verify_block: proc do |value|
|
|
64
|
+
unless %w[android ios flutter react_native].include?(value)
|
|
65
|
+
UI.user_error!("Invalid platform: #{value}. Must be 'android', 'ios', 'flutter', or 'react_native'")
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
),
|
|
69
|
+
FastlaneCore::ConfigItem.new(
|
|
70
|
+
key: :scan_mode,
|
|
71
|
+
env_name: "SECLANE_SCAN_MODE",
|
|
72
|
+
description: "Scan mode: 'diff' for changed files only, 'full' for all files",
|
|
73
|
+
default_value: "diff",
|
|
74
|
+
optional: true,
|
|
75
|
+
type: String,
|
|
76
|
+
verify_block: proc do |value|
|
|
77
|
+
unless %w[diff full].include?(value)
|
|
78
|
+
UI.user_error!("Invalid scan_mode: #{value}. Must be 'diff' or 'full'")
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
),
|
|
82
|
+
FastlaneCore::ConfigItem.new(
|
|
83
|
+
key: :base_branch,
|
|
84
|
+
env_name: "SECLANE_BASE_BRANCH",
|
|
85
|
+
description: "Branch to diff against when using diff scan mode",
|
|
86
|
+
default_value: "main",
|
|
87
|
+
optional: true,
|
|
88
|
+
type: String
|
|
89
|
+
),
|
|
90
|
+
FastlaneCore::ConfigItem.new(
|
|
91
|
+
key: :severity_threshold,
|
|
92
|
+
env_name: "SECLANE_SEVERITY_THRESHOLD",
|
|
93
|
+
description: "Minimum severity to report: 'low', 'medium', 'high'",
|
|
94
|
+
default_value: "low",
|
|
95
|
+
optional: true,
|
|
96
|
+
type: String,
|
|
97
|
+
verify_block: proc do |value|
|
|
98
|
+
unless %w[low medium high].include?(value)
|
|
99
|
+
UI.user_error!("Invalid severity_threshold: #{value}")
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
),
|
|
103
|
+
FastlaneCore::ConfigItem.new(
|
|
104
|
+
key: :fail_on_severity,
|
|
105
|
+
env_name: "SECLANE_FAIL_ON_SEVERITY",
|
|
106
|
+
description: "Fail the lane at this severity: 'low', 'medium', 'high', 'none'",
|
|
107
|
+
default_value: "high",
|
|
108
|
+
optional: true,
|
|
109
|
+
type: String,
|
|
110
|
+
verify_block: proc do |value|
|
|
111
|
+
unless %w[low medium high none].include?(value)
|
|
112
|
+
UI.user_error!("Invalid fail_on_severity: #{value}")
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
),
|
|
116
|
+
FastlaneCore::ConfigItem.new(
|
|
117
|
+
key: :fail_on_count,
|
|
118
|
+
env_name: "SECLANE_FAIL_ON_COUNT",
|
|
119
|
+
description: "Number of findings at fail severity needed to fail the lane (default: 1)",
|
|
120
|
+
default_value: 1,
|
|
121
|
+
optional: true,
|
|
122
|
+
type: Integer
|
|
123
|
+
),
|
|
124
|
+
FastlaneCore::ConfigItem.new(
|
|
125
|
+
key: :custom_patterns,
|
|
126
|
+
env_name: "SECLANE_CUSTOM_PATTERNS",
|
|
127
|
+
description: "Additional regex patterns to scan for",
|
|
128
|
+
default_value: [],
|
|
129
|
+
optional: true,
|
|
130
|
+
type: Array
|
|
131
|
+
),
|
|
132
|
+
FastlaneCore::ConfigItem.new(
|
|
133
|
+
key: :exclude_patterns,
|
|
134
|
+
env_name: "SECLANE_EXCLUDE_PATTERNS",
|
|
135
|
+
description: "File glob patterns to ignore",
|
|
136
|
+
default_value: [],
|
|
137
|
+
optional: true,
|
|
138
|
+
type: Array
|
|
139
|
+
),
|
|
140
|
+
FastlaneCore::ConfigItem.new(
|
|
141
|
+
key: :output_format,
|
|
142
|
+
env_name: "SECLANE_OUTPUT_FORMAT",
|
|
143
|
+
description: "Output format: 'text', 'json', 'junit', 'markdown'",
|
|
144
|
+
default_value: "text",
|
|
145
|
+
optional: true,
|
|
146
|
+
type: String,
|
|
147
|
+
verify_block: proc do |value|
|
|
148
|
+
unless %w[text json junit markdown sonarqube].include?(value)
|
|
149
|
+
UI.user_error!("Invalid output_format: #{value}")
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
),
|
|
153
|
+
FastlaneCore::ConfigItem.new(
|
|
154
|
+
key: :disabled_rules,
|
|
155
|
+
env_name: "SECLANE_DISABLED_RULES",
|
|
156
|
+
description: "List of rule names to disable",
|
|
157
|
+
default_value: [],
|
|
158
|
+
optional: true,
|
|
159
|
+
type: Array
|
|
160
|
+
),
|
|
161
|
+
FastlaneCore::ConfigItem.new(
|
|
162
|
+
key: :disabled_categories,
|
|
163
|
+
env_name: "SECLANE_DISABLED_CATEGORIES",
|
|
164
|
+
description: "List of rule categories to disable (e.g., 'ai_provider', 'saas_tokens')",
|
|
165
|
+
default_value: [],
|
|
166
|
+
optional: true,
|
|
167
|
+
type: Array
|
|
168
|
+
),
|
|
169
|
+
FastlaneCore::ConfigItem.new(
|
|
170
|
+
key: :config_file,
|
|
171
|
+
env_name: "SECLANE_CONFIG_FILE",
|
|
172
|
+
description: "Path to .seclane.yml config file",
|
|
173
|
+
default_value: ".seclane.yml",
|
|
174
|
+
optional: true,
|
|
175
|
+
type: String
|
|
176
|
+
)
|
|
177
|
+
]
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
def self.is_supported?(platform)
|
|
181
|
+
[:ios, :android].include?(platform)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def self.category
|
|
185
|
+
:testing
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
def self.output
|
|
189
|
+
[
|
|
190
|
+
["SECLANE_FINDINGS_COUNT", "Number of findings that met the severity threshold"],
|
|
191
|
+
["SECLANE_REPORT", "The full scan report text"]
|
|
192
|
+
]
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
module SharedValues
|
|
197
|
+
SECLANE_FINDINGS_COUNT = :SECLANE_FINDINGS_COUNT
|
|
198
|
+
SECLANE_REPORT = :SECLANE_REPORT
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require "fastlane/plugin/seclane/version"
|
|
2
|
+
|
|
3
|
+
module Fastlane
|
|
4
|
+
module Seclane
|
|
5
|
+
def self.all_classes
|
|
6
|
+
Dir[File.expand_path("**/{actions,helper}/*.rb", File.dirname(__FILE__))]
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
Fastlane::Seclane.all_classes.each do |current|
|
|
12
|
+
require current
|
|
13
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: fastlane-plugin-seclane
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Seclane by Cluelane
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-03-29 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: seclane-core
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '2.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '3.12'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '3.12'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rake
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '13.0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '13.0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: fastlane
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '2.0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '2.0'
|
|
83
|
+
description:
|
|
84
|
+
email:
|
|
85
|
+
executables: []
|
|
86
|
+
extensions: []
|
|
87
|
+
extra_rdoc_files: []
|
|
88
|
+
files:
|
|
89
|
+
- lib/fastlane/plugin/seclane.rb
|
|
90
|
+
- lib/fastlane/plugin/seclane/actions/seclane_scan_action.rb
|
|
91
|
+
- lib/fastlane/plugin/seclane/version.rb
|
|
92
|
+
homepage: https://github.com/tsvetilian-ty/seclane
|
|
93
|
+
licenses:
|
|
94
|
+
- AGPL-3.0
|
|
95
|
+
metadata: {}
|
|
96
|
+
post_install_message:
|
|
97
|
+
rdoc_options: []
|
|
98
|
+
require_paths:
|
|
99
|
+
- lib
|
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
|
+
requirements:
|
|
102
|
+
- - ">="
|
|
103
|
+
- !ruby/object:Gem::Version
|
|
104
|
+
version: 2.7.0
|
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '0'
|
|
110
|
+
requirements: []
|
|
111
|
+
rubygems_version: 3.4.19
|
|
112
|
+
signing_key:
|
|
113
|
+
specification_version: 4
|
|
114
|
+
summary: Fastlane plugin to scan Android and iOS apps for secrets and tokens
|
|
115
|
+
test_files: []
|