Skip to content

Commit

Permalink
Add dependency graph support to remaining ecosystems (#754)
Browse files Browse the repository at this point in the history
This PR builds off of #746 to add support for ancestral dependencies of the remaining ecosystems supported by CD. The list of ecosystems supporting graph creation can be found here.
  • Loading branch information
jalkire authored Oct 15, 2024
1 parent 4e682e6 commit a6b9f9c
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

namespace Microsoft.Sbom.Adapters.ComponentDetection;

using System.Linq;
using Microsoft.ComponentDetection.Contracts.TypedComponent;
using Microsoft.Sbom.Contracts;

@@ -29,5 +30,6 @@ internal static class CargoComponentExtensions
},
FilesAnalyzed = false,
Type = "cargo",
DependOn = component.AncestralReferrers?.FirstOrDefault()?.Id,
};
}
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
namespace Microsoft.Sbom.Adapters.ComponentDetection;

using System;
using System.Linq;
using Microsoft.ComponentDetection.Contracts.Internal;
using Microsoft.ComponentDetection.Contracts.TypedComponent;
using Microsoft.Sbom.Contracts;
@@ -39,6 +40,7 @@ internal static class NpmComponentExtensions
},
FilesAnalyzed = false,
Type = "npm",
DependOn = component.AncestralReferrers?.FirstOrDefault()?.Id,
};

/// <summary>
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

namespace Microsoft.Sbom.Adapters.ComponentDetection;

using System.Linq;
using Microsoft.ComponentDetection.Contracts.TypedComponent;
using Microsoft.Sbom.Contracts;

@@ -29,5 +30,6 @@ internal static class PipComponentExtensions
},
FilesAnalyzed = false,
Type = "python",
DependOn = component.AncestralReferrers?.FirstOrDefault()?.Id,
};
}
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

namespace Microsoft.Sbom.Adapters.ComponentDetection;

using System.Linq;
using Microsoft.ComponentDetection.Contracts.TypedComponent;
using Microsoft.Sbom.Contracts;

@@ -30,5 +31,6 @@ internal static class PodComponentExtensions
},
FilesAnalyzed = false,
Type = "pod",
DependOn = component.AncestralReferrers?.FirstOrDefault()?.Id,
};
}
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

namespace Microsoft.Sbom.Adapters.ComponentDetection;

using System.Linq;
using Microsoft.ComponentDetection.Contracts.TypedComponent;
using Microsoft.Sbom.Contracts;

@@ -32,5 +33,6 @@ internal static class RubyGemsComponentExtensions
},
FilesAnalyzed = false,
Type = "ruby",
DependOn = component.AncestralReferrers?.FirstOrDefault()?.Id,
};
}

0 comments on commit a6b9f9c

Please sign in to comment.