On Mon, May 13, 2019 at 12:51:58PM +0100, Daniel P. Berrangé wrote:
We need to track more info against each branch, so use a more
advanced data structure.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
scripts/report-vulnerable-tags.pl | 53 ++++++++++++++++++++++---------
1 file changed, 38 insertions(+), 15 deletions(-)
diff --git a/scripts/report-vulnerable-tags.pl b/scripts/report-vulnerable-tags.pl
index 0b6ea6f..14d31c0 100644
--- a/scripts/report-vulnerable-tags.pl
+++ b/scripts/report-vulnerable-tags.pl
[...]
}
-foreach my $branch (sort versioncmp @branches) {
+foreach my $branch (sort versioncmp keys %branches) {
print " <branch>\n";
print " <name>$branch</name>\n";
- foreach my $tag (sort versioncmp @{$branches{$branch}}) {
+ foreach my $tag (sort versioncmp keys
%{$branches{$branch}->{"brokentags"}}) {
print " <tag
state=\"vulnerable\">$tag</tag>\n";
}
- print " <change
state=\"vulnerable\">$changeset</change>\n";
+ foreach my $commit (@{$branches{$branch}->{"brokenchanges"}}) {
+ print " <change
state=\"vulnerable\">$commit</change>\n";
^ TAB
+ }
if ($branch eq "master") {
print " <change state=\"fixed\"></change>\n";
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano