Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Dependency Management Data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
tanna.dev
Dependency Management Data
Commits
7abcbd76
Commit
7abcbd76
authored
1 year ago
by
Jamie Tanna
Browse files
Options
Downloads
Patches
Plain Diff
Add demo for `report dependenton`
parent
400b1393
No related branches found
No related tags found
1 merge request
!167
Add `dependenton` report
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
demos/main.go
+39
-0
39 additions, 0 deletions
demos/main.go
with
39 additions
and
0 deletions
demos/main.go
+
39
−
0
View file @
7abcbd76
...
...
@@ -24,6 +24,8 @@ func main() {
d
.
Add
(
reportAdvisories
(),
"demo-reportAdvisories"
,
""
)
d
.
Add
(
reportLicenses
(),
"demo-reportLicenses"
,
""
)
d
.
Add
(
reportDependenton
(),
"demo-reportDependenton"
,
""
)
d
.
Run
()
}
...
...
@@ -378,3 +380,40 @@ func generatePolicyViolations() *demo.Run {
return
r
}
func
reportDependenton
()
*
demo
.
Run
{
r
:=
demo
.
NewRun
(
"Report usage of a given dependency"
,
"Report usage of a given dependency, and optionally the specific version in use, across all known projects in the database."
,
)
r
.
Step
(
demo
.
S
(
"Report usage of a given dependency"
,
"The use of package-manager=golang targets SBOM-derived data"
,
),
demo
.
S
(
"dmd report dependenton --db dmd.db --package-manager=golang --package-name=golang.org/x/oauth2"
,
))
r
.
Step
(
demo
.
S
(
"Report usage of a given dependency, at a specific `version`"
,
"The use of package-manager=gomod targets Renovate-derived data"
,
),
demo
.
S
(
"dmd report dependenton --db dmd.db --package-manager=gomod --package-name=golang.org/x/oauth2 --package-version v0.8.0"
,
))
r
.
Step
(
demo
.
S
(
"Report usage of a given dependency, at a specific `version`"
,
"Note that the `version` must match the exact value in the DB"
,
),
demo
.
S
(
"dmd report dependenton --db dmd.db --package-manager=npm --package-name=@jamietanna/spectral-test-harness --package-version '^0.3.0'"
,
))
r
.
Step
(
demo
.
S
(
"Report usage of a given dependency, at a specific `current_version`"
,
"Note that the `current_version` must match the exact value in the DB"
,
),
demo
.
S
(
"dmd report dependenton --db dmd.db --package-manager=npm --package-name=@jamietanna/spectral-test-harness --package-current-version '0.3.0'"
,
))
return
r
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment