Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbom-checker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sdl-tools
sbom-checker
Commits
609740e6
Commit
609740e6
authored
4 months ago
by
Шастун Екатерина (ИСП РАН)
Browse files
Options
Downloads
Patches
Plain Diff
added fossil vcs support for sbom-checker.py
parent
54a9e845
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sbom-checker.py
+1
-1
1 addition, 1 deletion
sbom-checker.py
sbom_utils.py
+14
-0
14 additions, 0 deletions
sbom_utils.py
with
15 additions
and
1 deletion
sbom-checker.py
+
1
−
1
View file @
609740e6
...
...
@@ -74,7 +74,7 @@ try:
if
type
(
ref
)
==
dict
and
ref
.
get
(
'
type
'
,
''
)
==
'
vcs
'
:
url
=
ref
.
get
(
'
url
'
,
''
)
res
=
parse_repo_url
(
url
)
if
res
:
if
res
and
res
[
1
]
:
url
=
res
[
0
]
ex_str
=
''
if
not
url
in
repo_dict
:
...
...
This diff is collapsed.
Click to expand it.
sbom_utils.py
+
14
−
0
View file @
609740e6
...
...
@@ -88,6 +88,20 @@ def check_repo(url, git_instance):
except
Exception
as
e
:
exc_list
.
append
(
f
'
ERROR/HG:
{
e
}
'
)
result
=
False
if
not
result
:
try
:
res3
=
subprocess
.
run
(
f
'
curl --silent
{
url
}
2>&1 | grep -iPzo
"
<footer>\sthis\spage\swas\sgenerated\sin\sabout\s(\d+\.\d+)s\sby\sfossil
"'
,
shell
=
True
,
capture_output
=
True
,
text
=
True
)
if
res3
.
stdout
.
startswith
(
'
<footer>
'
):
result
=
True
elif
res3
.
stderr
:
exc_list
.
append
(
f
'
ERROR/FOSSIL:
{
res3
.
stderr
}
'
)
result
=
False
else
:
exc_list
.
append
(
f
'
ERROR/FOSSIL: didn
\'
t find autogenerated fossil footer on this page
'
)
result
=
False
except
Exception
as
e
:
exc_list
.
append
(
f
'
ERROR/FOSSIL:
{
e
}
'
)
result
=
False
return
result
,
'
\n
'
.
join
(
exc_list
)
def
validate_no_duplicate_keys
(
list_of_pairs
):
...
...
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