Skip to content

Commit 49b2e14

Browse files
committed
Add Sonatype Lift as a dependency update tool, doc upgrade
Signed-off-by: Theresa Mammarella <[email protected]>
1 parent 2c16c8f commit 49b2e14

File tree

4 files changed

+41
-15
lines changed

4 files changed

+41
-15
lines changed

checks/evaluation/dependency_update_tool.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,8 @@ func DependencyUpdateTool(name string, dl checker.DetailLogger,
3333
// Apply the policy evaluation.
3434
if r.Tools == nil || len(r.Tools) == 0 {
3535
dl.Warn(&checker.LogMessage{
36-
Text: `dependabot config file not detected in source location.
37-
We recommend setting this configuration in code so it can be easily verified by others.`,
38-
})
39-
dl.Warn(&checker.LogMessage{
40-
Text: `renovatebot config file not detected in source location.
41-
We recommend setting this configuration in code so it can be easily verified by others.`,
36+
Text: `Config file not detected in source location for dependabot, renovatebot, Sonatype Lift, or
37+
PyUp (Python). We recommend setting this configuration in code so it can be easily verified by others.`,
4238
})
4339
return checker.CreateMinScoreResult(name, "no update tool detected")
4440
}

checks/raw/dependency_update_tool.go

+13
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,19 @@ var checkDependencyFileExists fileparser.DoWhileTrueOnFilename = func(name strin
112112
},
113113
},
114114
})
115+
case ".lift.toml", ".lift/config.toml":
116+
*ptools = append(*ptools, checker.Tool{
117+
Name: "Sonatype Lift",
118+
URL: asPointer("https://lift.sonatype.com"),
119+
Desc: asPointer("Automated dependency updates. Multi-platform and multi-language."),
120+
Files: []checker.File{
121+
{
122+
Path: name,
123+
Type: checker.FileTypeSource,
124+
Offset: checker.OffsetDefault,
125+
},
126+
},
127+
})
115128
default:
116129
// Continue iterating.
117130
return true, nil

checks/raw/dependency_update_tool_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,24 @@ func Test_checkDependencyFileExists(t *testing.T) {
119119
want: false,
120120
wantErr: false,
121121
},
122+
{
123+
name: ".lift.toml",
124+
args: args{
125+
name: ".lift.toml",
126+
data: &[]checker.Tool{},
127+
},
128+
want: false,
129+
wantErr: false,
130+
},
131+
{
132+
name: ".lift/config.toml",
133+
args: args{
134+
name: ".lift/config.toml",
135+
data: &[]checker.Tool{},
136+
},
137+
want: false,
138+
wantErr: false,
139+
},
122140
}
123141
for _, tt := range tests {
124142
tt := tt

docs/checks/internal/checks.yaml

+8-9
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ checks:
5757
Risk: `High` (possibly vulnerable to attacks on known flaws)
5858
5959
This check tries to determine if the project uses a dependency update tool,
60-
specifically [dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates) or
61-
[renovatebot](https://docs.renovatebot.com/configuration-options/). Out-of-date
62-
dependencies make a project vulnerable to known flaws and prone to attacks.
60+
specifically one of:
61+
- [dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates)
62+
- [renovatebot](https://docs.renovatebot.com/configuration-options/)
63+
- [Sonatype Lift](https://help.sonatype.com/lift/getting-started)
64+
- [PyUp](https://docs.pyup.io/docs) (Python)
65+
Out-of-date dependencies make a project vulnerable to known flaws and prone to attacks.
6366
These tools automate the process of updating dependencies by scanning for
6467
outdated or insecure requirements, and opening a pull request to update them if
6568
found.
@@ -75,9 +78,7 @@ checks:
7578
7679
remediation:
7780
- >-
78-
Signup for automatic dependency updates with
79-
[dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates) or
80-
[renovatebot](https://docs.renovatebot.com/configuration-options/) and place
81+
Signup for automatic dependency updates with one of the previously listed dependency update tools and place
8182
the config file in the locations that are recommended by these tools. Due to
8283
https://github.com/dependabot/dependabot-core/issues/2804 Dependabot can
8384
be enabled for forks where security updates have ever been turned on so projects
@@ -510,9 +511,7 @@ checks:
510511
the "Pin actions to a full length commit SHA". You may also tick the "Restrict permissions for GITHUB_TOKEN" to fix issues found
511512
by the Token-Permissions check.
512513
- >-
513-
To help update your dependencies after pinning them, use tools such as
514-
Github's [dependabot](https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/)
515-
or [renovate bot](https://github.com/renovatebot/renovate).
514+
To help update your dependencies after pinning them, use tools such as those listed for the dependency update tool check.
516515
SAST:
517516
risk: Medium
518517
tags: supply-chain, security, testing

0 commit comments

Comments
 (0)