Update GitLab 15 Breaking Changes authored by Ben Prescott (ex-GitLab)'s avatar Ben Prescott (ex-GitLab)
......@@ -614,11 +614,35 @@ We are removing the `DS_DEFAULT_ANALYZERS` environment variable from Dependency
- [Issue](https://gitlab.com/gitlab-org/gitlab/-/issues/333299)
#### :ballot_box_with_check: find projects that might be affected :gem: :gear: [-TODO-]
#### :ballot_box_with_check: Rails code to find DS projects :gem:
- list all dependency scanning artifacts created in the last 3 months, including project
```ruby
Ci::JobArtifact.where("file_type = ?", 6).where("created_at > ?", 3.month.ago).find_each do |a|
p=Project.find_by_id(a.project_id)
puts "project: '#{p.full_path}' created:'#{a.created_at}' report:'#{a.file}'"
end
```
- unique projects generating dependency scanning artifacts in three months
- check that their CI variables in the UI or in `.gitlab_ci.yml` don't rely on `DS_DEFAULT_ANALYZERS`
- email addresses of owners of affected projects are printed out
```ruby
prj=[]
Ci::JobArtifact.where("file_type = ?", 6).where("created_at > ?", 3.month.ago).find_each do |a|
prj.push Project.find_by_id(a.project_id)
end;nil
prj.uniq.each do |p|
puts "#{p.full_path}"
powners=p.owners
powners.each do |powner|
puts " #{powner.email}"
end
end;nil
```
- Might be possible to locate dependency scanning jobs by name
- Might then be possible to will isolate affected projects to check for this environment variable
- Could check all CI variables in the database for `DS_DEFAULT_ANALYZERS`
---
......
......