diff --git a/controllers/dependencyfirewall/composer.go b/controllers/dependencyfirewall/composer.go index 6d8e0a86f..91363dcc5 100644 --- a/controllers/dependencyfirewall/composer.go +++ b/controllers/dependencyfirewall/composer.go @@ -65,7 +65,7 @@ func expandComposerVersions(entries []json.RawMessage, minified string) ([]json. return expanded, nil } -var composerProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/(?:[^/]+/)?composer(?:/|$)`) +var composerProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/[^/]+/composer(?:/|$)`) // ComposerDependencyProxyController handles php dependency proxy requests. // It embeds DependencyProxyController to reuse shared helpers and state. @@ -152,9 +152,8 @@ func (composerEcosystem) writeResponse(c shared.Context, data []byte, path strin // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Success 200 {file} binary -// @Router /dependency-proxy/composer/{path} [get] // @Router /dependency-proxy/{secret}/composer/{path} [get] func (d *ComposerDependencyProxyController) ProxyComposer(c shared.Context) error { path := composer.trimPrefix(c.Request().URL.Path) diff --git a/controllers/dependencyfirewall/composer_test.go b/controllers/dependencyfirewall/composer_test.go index 74be37e4c..1177fb8aa 100644 --- a/controllers/dependencyfirewall/composer_test.go +++ b/controllers/dependencyfirewall/composer_test.go @@ -22,17 +22,12 @@ import ( ) func TestComposerEcosystem(t *testing.T) { - t.Run("trimPrefix with and without secret", func(t *testing.T) { + t.Run("trimPrefix", func(t *testing.T) { cases := []struct { name string path string expected string }{ - { - name: "without secret", - path: "/api/v1/dependency-proxy/composer/p2/monolog/monolog.json", - expected: "p2/monolog/monolog.json", - }, { name: "with secret", path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/composer/p2/monolog/monolog.json", @@ -40,12 +35,12 @@ func TestComposerEcosystem(t *testing.T) { }, { name: "with trailing slash", - path: "/api/v1/dependency-proxy/composer/p2/monolog/monolog.json/", + path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/composer/p2/monolog/monolog.json/", expected: "p2/monolog/monolog.json", }, { name: "without trailing path", - path: "/api/v1/dependency-proxy/composer", + path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/composer", expected: "", }, } diff --git a/controllers/dependencyfirewall/controller.go b/controllers/dependencyfirewall/controller.go index 9493fddac..99626bfd6 100644 --- a/controllers/dependencyfirewall/controller.go +++ b/controllers/dependencyfirewall/controller.go @@ -18,6 +18,7 @@ package dependencyfirewall import ( "context" "encoding/json" + "errors" "fmt" "io" "log/slog" @@ -246,11 +247,10 @@ func (d *DependencyProxyController) GetDependencyProxyURLs(ctx shared.Context) e } // LoadConfigsBySecret resolves DependencyProxyConfigs for a secret string. -// An empty secret returns empty (permissive) configs without error. func (d *DependencyProxyController) LoadConfigsBySecret(c shared.Context, secret string) (DependencyProxyConfigs, error) { var configs DependencyProxyConfigs if secret == "" { - return configs, nil + return configs, errors.New("invalid dependency proxy secret: empty") } uuidSecret, err := uuid.Parse(secret) if err != nil { diff --git a/controllers/dependencyfirewall/debian.go b/controllers/dependencyfirewall/debian.go index d79726c45..c1d769672 100644 --- a/controllers/dependencyfirewall/debian.go +++ b/controllers/dependencyfirewall/debian.go @@ -22,7 +22,7 @@ const ( debCacheTTL = 168 * time.Hour ) -var debProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/(?:[^/]+/)?deb(?:/|$)`) +var debProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/[^/]+/deb(?:/|$)`) // DEBDependencyProxyController handles debian dependency proxy requests. // It embeds DependencyProxyController to reuse shared helpers and state. @@ -136,9 +136,8 @@ func (debEcosystem) writeResponse(c shared.Context, data []byte, path string, ca // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Success 200 {file} binary -// @Router /dependency-proxy/deb/{path} [get] // @Router /dependency-proxy/{secret}/deb/{path} [get] func (d *DebDependencyProxyController) ProxyDeb(c shared.Context) error { if strings.HasSuffix(strings.TrimSuffix(c.Request().URL.Path, "/"), ".deb") { diff --git a/controllers/dependencyfirewall/debian_test.go b/controllers/dependencyfirewall/debian_test.go index aaa6b7bcc..71180b81e 100644 --- a/controllers/dependencyfirewall/debian_test.go +++ b/controllers/dependencyfirewall/debian_test.go @@ -3,17 +3,12 @@ package dependencyfirewall import "testing" func TestDebEcosystem(t *testing.T) { - t.Run("trimPrefix with and without secret", func(t *testing.T) { + t.Run("trimPrefix", func(t *testing.T) { cases := []struct { name string path string expected string }{ - { - name: "without secret", - path: "/api/v1/dependency-proxy/deb/debian/dists/trixie/InRelease", - expected: "debian/dists/trixie/InRelease", - }, { name: "with secret", path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/deb/debian/dists/trixie/InRelease", @@ -21,7 +16,7 @@ func TestDebEcosystem(t *testing.T) { }, { name: "url encoded version is decoded", - path: "/api/v1/dependency-proxy/deb/debian/pool/main/c/curl/curl_8.14.1-2%2bdeb13u5_arm64.deb", + path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/deb/debian/pool/main/c/curl/curl_8.14.1-2%2bdeb13u5_arm64.deb", expected: "debian/pool/main/c/curl/curl_8.14.1-2+deb13u5_arm64.deb", }, } diff --git a/controllers/dependencyfirewall/golang.go b/controllers/dependencyfirewall/golang.go index 3fcc6127d..8d59b3b56 100644 --- a/controllers/dependencyfirewall/golang.go +++ b/controllers/dependencyfirewall/golang.go @@ -38,7 +38,7 @@ import ( const goProxyURL = "https://proxy.golang.org" var ( - goProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/(?:[^/]+/)?go(?:/|$)`) + goProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/[^/]+/go(?:/|$)`) goPathRe = regexp.MustCompile(`^([^@]+)(?:@v/([^/]+))?`) ) @@ -123,10 +123,8 @@ func (goEcosystem) writeResponse(c shared.Context, data []byte, path string, cac // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Success 200 {file} binary -// @Router /dependency-proxy/go [get] -// @Router /dependency-proxy/go/{path} [get] // @Router /dependency-proxy/{secret}/go [get] // @Router /dependency-proxy/{secret}/go/{path} [get] func (d *GoDependencyProxyController) ProxyGo(c shared.Context) error { diff --git a/controllers/dependencyfirewall/golang_test.go b/controllers/dependencyfirewall/golang_test.go index 0242bf845..bfc3be412 100644 --- a/controllers/dependencyfirewall/golang_test.go +++ b/controllers/dependencyfirewall/golang_test.go @@ -18,17 +18,12 @@ package dependencyfirewall import "testing" func TestGoEcosystem(t *testing.T) { - t.Run("trimPrefix with and without secret", func(t *testing.T) { + t.Run("trimPrefix", func(t *testing.T) { cases := []struct { name string path string expected string }{ - { - name: "without secret", - path: "/api/v1/dependency-proxy/go/github.com/foo/bar", - expected: "github.com/foo/bar", - }, { name: "with secret", path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/go/github.com/foo/bar", @@ -36,7 +31,7 @@ func TestGoEcosystem(t *testing.T) { }, { name: "trailing slash is trimmed", - path: "/api/v1/dependency-proxy/go/github.com/foo/bar/", + path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/go/github.com/foo/bar/", expected: "github.com/foo/bar", }, } diff --git a/controllers/dependencyfirewall/maven.go b/controllers/dependencyfirewall/maven.go index 005ac7b60..f24f3e7d8 100644 --- a/controllers/dependencyfirewall/maven.go +++ b/controllers/dependencyfirewall/maven.go @@ -35,7 +35,7 @@ import ( const mavenRegistry = "https://repo1.maven.org/maven2" var ( - mavenProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/(?:[^/]+/)?maven(?:/|$)`) + mavenProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/[^/]+/maven(?:/|$)`) mavenVersionDirRe = regexp.MustCompile(`^\d[A-Za-z0-9._+-]*$|-SNAPSHOT$`) mavenVersionsBlockRe = regexp.MustCompile(`(?s)(.*?)`) @@ -153,9 +153,8 @@ func mavenContentType(path string) string { // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Success 200 {file} binary -// @Router /dependency-proxy/maven/{path} [get] // @Router /dependency-proxy/{secret}/maven/{path} [get] func (d *MavenDependencyProxyController) ProxyMaven(c shared.Context) error { if strings.Contains(c.Request().URL.Path, "maven-metadata.xml") { diff --git a/controllers/dependencyfirewall/maven_test.go b/controllers/dependencyfirewall/maven_test.go index 97cc3d3fc..f3e6c156f 100644 --- a/controllers/dependencyfirewall/maven_test.go +++ b/controllers/dependencyfirewall/maven_test.go @@ -129,11 +129,6 @@ func TestMavenEcosystemTrimPrefix(t *testing.T) { path string expected string }{ - { - name: "without secret", - path: "/api/v1/dependency-proxy/maven/com/fake/artifact/maven-metadata.xml", - expected: "com/fake/artifact/maven-metadata.xml", - }, { name: "with secret", path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/maven/com/fake/artifact/1.2.3/artifact-1.2.3.jar", diff --git a/controllers/dependencyfirewall/npm.go b/controllers/dependencyfirewall/npm.go index 2ac12f842..4003222c1 100644 --- a/controllers/dependencyfirewall/npm.go +++ b/controllers/dependencyfirewall/npm.go @@ -25,7 +25,7 @@ import ( const npmRegistry = "https://registry.npmjs.org" -var npmProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/(?:[^/]+/)?npm(?:/|$)`) +var npmProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/[^/]+/npm(?:/|$)`) // NPMDependencyProxyController handles npm dependency proxy requests. // It embeds DependencyProxyController to reuse shared helpers and state. @@ -110,13 +110,11 @@ func (npmEcosystem) writeResponse(c shared.Context, data []byte, path string, ca // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Param package path string false "npm package name" // @Param scope path string false "npm scope" // @Param name path string false "npm package name (scoped)" // @Success 200 {file} binary -// @Router /dependency-proxy/npm/{package}/-/{path} [get] -// @Router /dependency-proxy/npm/{scope}/{name}/-/{path} [get] // @Router /dependency-proxy/{secret}/npm/{package}/-/{path} [get] // @Router /dependency-proxy/{secret}/npm/{scope}/{name}/-/{path} [get] func (d *NPMDependencyProxyController) ProxyNPMTarball(c shared.Context) error { @@ -284,13 +282,11 @@ func (d *NPMDependencyProxyController) fetchNPMReleaseTime(ctx context.Context, // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Param package path string false "npm package name" // @Param scope path string false "npm scope" // @Param name path string false "npm package name (scoped)" // @Success 200 {object} map[string]interface{} -// @Router /dependency-proxy/npm/{package} [get] -// @Router /dependency-proxy/npm/{scope}/{name} [get] // @Router /dependency-proxy/{secret}/npm/{package} [get] // @Router /dependency-proxy/{secret}/npm/{scope}/{name} [get] func (d *NPMDependencyProxyController) ProxyNPMMetadata(c shared.Context) error { @@ -386,10 +382,8 @@ func (d *NPMDependencyProxyController) ProxyNPMMetadata(c shared.Context) error // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Success 200 {object} map[string]interface{} -// @Router /dependency-proxy/npm/-/{path} [get] -// @Router /dependency-proxy/npm/-/{path} [post] // @Router /dependency-proxy/{secret}/npm/-/{path} [get] // @Router /dependency-proxy/{secret}/npm/-/{path} [post] func (d *NPMDependencyProxyController) ProxyNPMRegistryAPI(c shared.Context) error { diff --git a/controllers/dependencyfirewall/npm_test.go b/controllers/dependencyfirewall/npm_test.go index 8338f3485..944866c39 100644 --- a/controllers/dependencyfirewall/npm_test.go +++ b/controllers/dependencyfirewall/npm_test.go @@ -26,17 +26,12 @@ import ( ) func TestNPMEcosystem(t *testing.T) { - t.Run("trimPrefix with and without secret", func(t *testing.T) { + t.Run("trimPrefix", func(t *testing.T) { cases := []struct { name string path string expected string }{ - { - name: "without secret", - path: "/api/v1/dependency-proxy/npm/lodash", - expected: "lodash", - }, { name: "with secret", path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/npm/@babel/core", diff --git a/controllers/dependencyfirewall/oci.go b/controllers/dependencyfirewall/oci.go index a8051316e..9292561e5 100644 --- a/controllers/dependencyfirewall/oci.go +++ b/controllers/dependencyfirewall/oci.go @@ -37,7 +37,7 @@ import ( "go.opentelemetry.io/otel/trace" ) -var ociProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/(?:[^/]+/)?oci(?:/|$)`) +var ociProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/[^/]+/oci(?:/|$)`) // OCI Distribution Spec path-param formats. Anything outside these is // rejected at the edge so that path traversal, NUL injection, or other @@ -397,16 +397,12 @@ func (d *OCIDependencyProxyController) ProxyOCIVersionCheck(c shared.Context) er // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Param registry path string true "registry hostname" // @Param namespace path string false "image namespace" // @Param image path string true "image name" // @Param reference path string true "tag or digest" // @Success 200 {object} map[string]interface{} -// @Router /v2/{registry}/{image}/manifests/{reference} [get] -// @Router /v2/{registry}/{image}/manifests/{reference} [head] -// @Router /v2/{registry}/{namespace}/{image}/manifests/{reference} [get] -// @Router /v2/{registry}/{namespace}/{image}/manifests/{reference} [head] // @Router /v2/{secret}/{registry}/{namespace}/{image}/manifests/{reference} [get] // @Router /v2/{secret}/{registry}/{namespace}/{image}/manifests/{reference} [head] // @Router /v2/{secret}/{registry}/{ns1}/{ns2}/{image}/manifests/{reference} [get] @@ -529,16 +525,12 @@ func (d *OCIDependencyProxyController) ProxyOCIManifest(c shared.Context) error // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Param registry path string true "registry hostname" // @Param namespace path string false "image namespace" // @Param image path string true "image name" // @Param digest path string true "blob digest" // @Success 200 {file} binary -// @Router /v2/{registry}/{image}/blobs/{digest} [get] -// @Router /v2/{registry}/{image}/blobs/{digest} [head] -// @Router /v2/{registry}/{namespace}/{image}/blobs/{digest} [get] -// @Router /v2/{registry}/{namespace}/{image}/blobs/{digest} [head] // @Router /v2/{secret}/{registry}/{namespace}/{image}/blobs/{digest} [get] // @Router /v2/{secret}/{registry}/{namespace}/{image}/blobs/{digest} [head] // @Router /v2/{secret}/{registry}/{ns1}/{ns2}/{image}/blobs/{digest} [get] @@ -665,14 +657,12 @@ func (d *OCIDependencyProxyController) ProxyOCIBlob(c shared.Context) error { // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Param registry path string true "registry hostname" // @Param namespace path string false "image namespace" // @Param image path string true "image name" // @Param digest path string true "subject digest" // @Success 200 {object} map[string]interface{} -// @Router /v2/{registry}/{image}/referrers/{digest} [get] -// @Router /v2/{registry}/{namespace}/{image}/referrers/{digest} [get] // @Router /v2/{secret}/{registry}/{namespace}/{image}/referrers/{digest} [get] // @Router /v2/{secret}/{registry}/{ns1}/{ns2}/{image}/referrers/{digest} [get] func (d *OCIDependencyProxyController) ProxyOCIReferrers(c shared.Context) error { @@ -737,13 +727,11 @@ func (d *OCIDependencyProxyController) ProxyOCIReferrers(c shared.Context) error // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Param registry path string true "registry hostname" // @Param namespace path string false "image namespace" // @Param image path string true "image name" // @Success 200 {object} map[string]interface{} -// @Router /v2/{registry}/{image}/tags/list [get] -// @Router /v2/{registry}/{namespace}/{image}/tags/list [get] // @Router /v2/{secret}/{registry}/{namespace}/{image}/tags/list [get] // @Router /v2/{secret}/{registry}/{ns1}/{ns2}/{image}/tags/list [get] func (d *OCIDependencyProxyController) ProxyOCITagsList(c shared.Context) error { diff --git a/controllers/dependencyfirewall/python.go b/controllers/dependencyfirewall/python.go index 1c347683e..e6c09e619 100644 --- a/controllers/dependencyfirewall/python.go +++ b/controllers/dependencyfirewall/python.go @@ -43,7 +43,7 @@ const ( ) var ( - pypiProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/(?:[^/]+/)?pypi(?:/|$)`) + pypiProxyPrefixRe = regexp.MustCompile(`^/api/v1/dependency-proxy/[^/]+/pypi(?:/|$)`) pypiFilenameRe = regexp.MustCompile(`^(.+?)-(\d[^-]*?)(?:-.+\.whl|\.zip|\.tar(?:\.gz|\.bz2|\.xz|\.lz|\.lzma)?|\.t[bgx]z|\.tlz)$`) pypiNameSeparatorRe = regexp.MustCompile(`[-_.]+`) pypiAbsoluteURLRe = regexp.MustCompile(`(?:https?:)?//[^/"'\s]+/`) @@ -164,9 +164,8 @@ func (pypiEcosystem) writeResponse(c shared.Context, data []byte, path string, c // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Success 200 {file} binary -// @Router /dependency-proxy/pypi/packages/{path} [get] // @Router /dependency-proxy/{secret}/pypi/packages/{path} [get] func (d *PythonDependencyProxyController) ProxyPyPIPackage(c shared.Context) error { configs, err := d.GetDependencyProxyConfigs(c) @@ -312,10 +311,9 @@ type pySimple struct { // @Tags Dependency Firewall // @Security PATAuth // @Security BearerAuth -// @Param secret path string false "dependency proxy secret" +// @param secret path string true "dependency proxy secret" // @Param package path string true "PyPI package name" // @Success 200 {string} string "HTML simple index" -// @Router /dependency-proxy/pypi/simple/{package} [get] // @Router /dependency-proxy/{secret}/pypi/simple/{package} [get] func (d *PythonDependencyProxyController) ProxyPyPISimple(c shared.Context) error { config, err := d.GetDependencyProxyConfigs(c) @@ -327,7 +325,6 @@ func (d *PythonDependencyProxyController) ProxyPyPISimple(c shared.Context) erro return echo.NewHTTPError(http.StatusInternalServerError, "failed to load dependency proxy configuration") } - pkgName := normalizePyPIName(c.Param("package")) requestPath := pypi.trimPrefix(c.Request().URL.Path) diff --git a/controllers/dependencyfirewall/python_test.go b/controllers/dependencyfirewall/python_test.go index c0ea044d4..4b0a69206 100644 --- a/controllers/dependencyfirewall/python_test.go +++ b/controllers/dependencyfirewall/python_test.go @@ -73,11 +73,6 @@ func TestPyPIEcosystemTrimPrefix(t *testing.T) { path string expected string }{ - { - name: "without secret", - path: "/api/v1/dependency-proxy/pypi/simple/requests/", - expected: "simple/requests/", - }, { name: "with secret", path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/pypi/simple/requests/", @@ -94,6 +89,23 @@ func TestPyPIEcosystemTrimPrefix(t *testing.T) { } } +const testProxySecret = "550e8400-e29b-41d4-a716-446655440000" + +func newSecretScopedController(t *testing.T) *DependencyProxyController { + t.Helper() + assetID := uuid.New() + + proxyService := mocks.NewDependencyProxySecretService(t) + proxyService.EXPECT().GetModelBySecret(mock.Anything, uuid.MustParse(testProxySecret)).Return("asset", assetID, nil) + assetRepository := mocks.NewAssetRepository(t) + assetRepository.EXPECT().Read(mock.Anything, mock.Anything, assetID).Return(models.Asset{}, nil) + + return &DependencyProxyController{ + dependencyProxyService: proxyService, + assetRepository: assetRepository, + } +} + type simpleIndexTransport struct { contentType string body string @@ -119,25 +131,25 @@ func TestProxyPyPISimpleRewritesFileURLs(t *testing.T) { expected string }{ { - name: "html without secret", - path: "/api/v1/dependency-proxy/pypi/simple/requests/", + name: "html", + path: "/api/v1/dependency-proxy/" + testProxySecret + "/pypi/simple/requests/", contentType: "text/html", upstream: `requests-2.31.0-py3-none-any.whl`, - expected: `requests-2.31.0-py3-none-any.whl`, + expected: `requests-2.31.0-py3-none-any.whl`, }, { - name: "json with secret", - path: "/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/pypi/simple/requests/", + name: "json", + path: "/api/v1/dependency-proxy/" + testProxySecret + "/pypi/simple/requests/", contentType: "application/vnd.pypi.simple.v1+json", upstream: `{"files":[{"url":"https://files.pythonhosted.org/packages/ab/cd/requests-2.31.0-py3-none-any.whl"}]}`, - expected: `{"files":[{"url":"/api/v1/dependency-proxy/550e8400-e29b-41d4-a716-446655440000/pypi/packages/ab/cd/requests-2.31.0-py3-none-any.whl"}]}`, + expected: `{"files":[{"url":"/api/v1/dependency-proxy/` + testProxySecret + `/pypi/packages/ab/cd/requests-2.31.0-py3-none-any.whl"}]}`, }, { name: "scheme-relative and foreign host", - path: "/api/v1/dependency-proxy/pypi/simple/requests/", + path: "/api/v1/dependency-proxy/" + testProxySecret + "/pypi/simple/requests/", contentType: "text/html", upstream: `ab`, - expected: `ab`, + expected: `ab`, }, } @@ -147,18 +159,16 @@ func TestProxyPyPISimpleRewritesFileURLs(t *testing.T) { req := httptest.NewRequest(http.MethodGet, tc.path, nil) rec := httptest.NewRecorder() c := e.NewContext(req, rec) - c.SetParamNames("package") - c.SetParamValues("requests") + c.SetParamNames("secret", "package") + c.SetParamValues(testProxySecret, "requests") checker := mocks.NewMaliciousPackageChecker(t) checker.EXPECT().GetMaliciousComponents(mock.Anything, "pypi", "requests").Return(nil, nil) - ctrl := &PythonDependencyProxyController{ - DependencyProxyController: &DependencyProxyController{ - maliciousChecker: checker, - client: &http.Client{Transport: simpleIndexTransport{contentType: tc.contentType, body: tc.upstream}}, - }, - } + d := newSecretScopedController(t) + d.maliciousChecker = checker + d.client = &http.Client{Transport: simpleIndexTransport{contentType: tc.contentType, body: tc.upstream}} + ctrl := &PythonDependencyProxyController{DependencyProxyController: d} if err := ctrl.ProxyPyPISimple(c); err != nil { t.Fatalf("unexpected error: %v", err) } @@ -171,22 +181,20 @@ func TestProxyPyPISimpleRewritesFileURLs(t *testing.T) { func TestProxyPyPISimpleBlocksMaliciousBeforeUpstreamFetch(t *testing.T) { e := echo.New() - req := httptest.NewRequest(http.MethodGet, "/api/v1/dependency-proxy/pypi/simple/fake-malicious-pypi-package/", nil) + req := httptest.NewRequest(http.MethodGet, "/api/v1/dependency-proxy/"+testProxySecret+"/pypi/simple/fake-malicious-pypi-package/", nil) rec := httptest.NewRecorder() c := e.NewContext(req, rec) - c.SetParamNames("package") - c.SetParamValues("fake-malicious-pypi-package") + c.SetParamNames("secret", "package") + c.SetParamValues(testProxySecret, "fake-malicious-pypi-package") checker := mocks.NewMaliciousPackageChecker(t) checker.EXPECT().GetMaliciousComponents(mock.Anything, "pypi", "fake-malicious-pypi-package").Return([]models.MaliciousAffectedComponent{{MaliciousPackageID: "MAL-1"}}, nil) checker.EXPECT().GetMaliciousPackage(mock.Anything, "MAL-1").Return(models.MaliciousPackage{}, nil) - ctrl := &PythonDependencyProxyController{ - DependencyProxyController: &DependencyProxyController{ - maliciousChecker: checker, - client: &http.Client{Transport: simpleIndexTransport{}}, - }, - } + d := newSecretScopedController(t) + d.maliciousChecker = checker + d.client = &http.Client{Transport: simpleIndexTransport{}} + ctrl := &PythonDependencyProxyController{DependencyProxyController: d} if err := ctrl.ProxyPyPISimple(c); err != nil { t.Fatalf("unexpected error: %v", err) @@ -197,24 +205,21 @@ func TestProxyPyPISimpleBlocksMaliciousBeforeUpstreamFetch(t *testing.T) { } func TestProxyPyPISimpleNormalizesPackageNameFromParam(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(http.MethodGet, "/api/v1/dependency-proxy/pypi/simple/Typing_Extensions/", nil) + req := httptest.NewRequest(http.MethodGet, "/api/v1/dependency-proxy/"+testProxySecret+"/pypi/simple/Typing_Extensions/", nil) rec := httptest.NewRecorder() c := e.NewContext(req, rec) - c.SetParamNames("package") - c.SetParamValues("Typing_Extensions") + c.SetParamNames("secret", "package") + c.SetParamValues(testProxySecret, "Typing_Extensions") checker := mocks.NewMaliciousPackageChecker(t) checker.EXPECT().GetMaliciousComponents(mock.Anything, "pypi", "typing-extensions").Return([]models.MaliciousAffectedComponent{{MaliciousPackageID: "MAL-1"}}, nil) checker.EXPECT().GetMaliciousPackage(mock.Anything, "MAL-1").Return(models.MaliciousPackage{}, nil) - ctrl := &PythonDependencyProxyController{ - DependencyProxyController: &DependencyProxyController{ - maliciousChecker: checker, - client: &http.Client{Transport: simpleIndexTransport{}}, - }, - } + d := newSecretScopedController(t) + d.maliciousChecker = checker + d.client = &http.Client{Transport: simpleIndexTransport{}} + ctrl := &PythonDependencyProxyController{DependencyProxyController: d} if err := ctrl.ProxyPyPISimple(c); err != nil { t.Fatalf("unexpected error: %v", err) @@ -226,19 +231,19 @@ func TestProxyPyPISimpleNormalizesPackageNameFromParam(t *testing.T) { func TestProxyPyPIPackageFailsClosedOnMaliciousCheckError(t *testing.T) { e := echo.New() - req := httptest.NewRequest(http.MethodGet, "/api/v1/dependency-proxy/pypi/packages/ab/cd/requests-2.32.3.tar.gz/", nil) + req := httptest.NewRequest(http.MethodGet, "/api/v1/dependency-proxy/"+testProxySecret+"/pypi/packages/ab/cd/requests-2.32.3.tar.gz/", nil) c := e.NewContext(req, httptest.NewRecorder()) + c.SetParamNames("secret") + c.SetParamValues(testProxySecret) checker := mocks.NewMaliciousPackageChecker(t) checker.EXPECT().GetMaliciousComponents(mock.Anything, "pypi", "requests").Return(nil, errors.New("db down")) - ctrl := &PythonDependencyProxyController{ - DependencyProxyController: &DependencyProxyController{ - maliciousChecker: checker, - cache: newCache(t.TempDir(), 10), - client: &http.Client{Transport: simpleIndexTransport{}}, - }, - } + d := newSecretScopedController(t) + d.maliciousChecker = checker + d.cache = newCache(t.TempDir(), 10) + d.client = &http.Client{Transport: simpleIndexTransport{}} + ctrl := &PythonDependencyProxyController{DependencyProxyController: d} err := ctrl.ProxyPyPIPackage(c) httpErr, ok := err.(*echo.HTTPError) diff --git a/docs/swagger.json b/docs/swagger.json index 795cbb3bf..74f8c2007 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -14631,28 +14631,24 @@ 1000000000, 60000000000, 3600000000000, + -9223372036854775808, + 9223372036854775807, 1, 1000, 1000000, 1000000000, 60000000000, 3600000000000, - 1, - 1000, - 1000000, - 1000000000, - 1, - 1000, - 1000000, - 1000000000, - 60000000000, - 3600000000000, + -9223372036854775808, + 9223372036854775807, 1, 1000, 1000000, 1000000000, 60000000000, 3600000000000, + -9223372036854775808, + 9223372036854775807, 1, 1000, 1000000, @@ -14670,28 +14666,24 @@ "Second", "Minute", "Hour", + "minDuration", + "maxDuration", "Nanosecond", "Microsecond", "Millisecond", "Second", "Minute", "Hour", - "Nanosecond", - "Microsecond", - "Millisecond", - "Second", - "Nanosecond", - "Microsecond", - "Millisecond", - "Second", - "Minute", - "Hour", + "minDuration", + "maxDuration", "Nanosecond", "Microsecond", "Millisecond", "Second", "Minute", "Hour", + "minDuration", + "maxDuration", "Nanosecond", "Microsecond", "Millisecond", @@ -15821,13 +15813,14 @@ ] } }, - "/dependency-proxy/composer/{path}": { + "/dependency-proxy/{secret}/composer/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -15859,13 +15852,14 @@ ] } }, - "/dependency-proxy/deb/{path}": { + "/dependency-proxy/{secret}/deb/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -15897,13 +15891,14 @@ ] } }, - "/dependency-proxy/go": { + "/dependency-proxy/{secret}/go": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -15935,13 +15930,14 @@ ] } }, - "/dependency-proxy/go/{path}": { + "/dependency-proxy/{secret}/go/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -15973,13 +15969,14 @@ ] } }, - "/dependency-proxy/maven/{path}": { + "/dependency-proxy/{secret}/maven/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16011,13 +16008,14 @@ ] } }, - "/dependency-proxy/npm/-/{path}": { + "/dependency-proxy/{secret}/npm/-/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16055,6 +16053,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16087,13 +16086,14 @@ ] } }, - "/dependency-proxy/npm/{package}": { + "/dependency-proxy/{secret}/npm/{package}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16150,13 +16150,14 @@ ] } }, - "/dependency-proxy/npm/{package}/-/{path}": { + "/dependency-proxy/{secret}/npm/{package}/-/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16212,13 +16213,14 @@ ] } }, - "/dependency-proxy/npm/{scope}/{name}": { + "/dependency-proxy/{secret}/npm/{scope}/{name}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16275,13 +16277,14 @@ ] } }, - "/dependency-proxy/npm/{scope}/{name}/-/{path}": { + "/dependency-proxy/{secret}/npm/{scope}/{name}/-/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16337,13 +16340,14 @@ ] } }, - "/dependency-proxy/pypi/packages/{path}": { + "/dependency-proxy/{secret}/pypi/packages/{path}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16375,13 +16379,14 @@ ] } }, - "/dependency-proxy/pypi/simple/{package}": { + "/dependency-proxy/{secret}/pypi/simple/{package}": { "get": { "parameters": [ { "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -16422,138 +16427,100 @@ ] } }, - "/dependency-proxy/{secret}/composer/{path}": { + "/health": { "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "type": "file" + "properties": { + "status": { + "type": "string" + } + }, + "type": "object" } } }, "description": "OK" - } - }, - "security": [ - { - "PATAuth": [] }, - { - "BearerAuth": [] + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Service Unavailable" } - ], - "summary": "Proxy Composer repository request", + }, + "summary": "Liveness and readiness check", "tags": [ - "Dependency Firewall" + "System" ] } }, - "/dependency-proxy/{secret}/deb/{path}": { + "/info": { "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/dtos.InfoResponse" } } }, "description": "OK" } }, - "security": [ - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Proxy Debian repository request", + "summary": "Runtime, build and database diagnostics", "tags": [ - "Dependency Firewall" + "System" ] } }, - "/dependency-proxy/{secret}/go": { + "/instance-settings": { "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/dtos.InstanceSettingsDTO" } } }, "description": "OK" } }, - "security": [ - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Proxy Go module requests", + "summary": "Get public instance settings", "tags": [ - "Dependency Firewall" + "Admin" ] } }, - "/dependency-proxy/{secret}/go/{path}": { + "/integrations/repositories": { "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "type": "file" + "items": { + "$ref": "#/components/schemas/dtos.GitRepository" + }, + "type": "array" } } }, @@ -16561,6 +16528,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -16568,19 +16538,29 @@ "BearerAuth": [] } ], - "summary": "Proxy Go module requests", + "summary": "List repositories from integrations for the session", "tags": [ - "Dependency Firewall" + "Integrations" ] } }, - "/dependency-proxy/{secret}/maven/{path}": { + "/lookup": { "get": { "parameters": [ { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", + "description": "Provider name", + "in": "query", + "name": "provider", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Repository ID", + "in": "query", + "name": "id", + "required": true, "schema": { "type": "string" } @@ -16591,34 +16571,27 @@ "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/dtos.LookupResponse" } } }, "description": "OK" } }, - "security": [ - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Proxy Maven repository request", + "summary": "Lookup asset by provider", "tags": [ - "Dependency Firewall" + "Assets" ] } }, - "/dependency-proxy/{secret}/npm/-/{path}": { + "/oauth2/gitlab/callback/{integrationName}": { "get": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Integration name", "in": "path", - "name": "secret", + "name": "integrationName", + "required": true, "schema": { "type": "string" } @@ -16626,36 +16599,28 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": {}, - "type": "object" - } - } - }, "description": "OK" } }, "security": [ { - "PATAuth": [] - }, - { - "BearerAuth": [] + "CookieAuth": [] } ], - "summary": "Proxy npm registry API request", + "summary": "GitLab OAuth2 callback", "tags": [ - "Dependency Firewall" + "Integrations" ] - }, - "post": { + } + }, + "/oauth2/gitlab/{integrationName}": { + "get": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Integration name", "in": "path", - "name": "secret", + "name": "integrationName", + "required": true, "schema": { "type": "string" } @@ -16663,74 +16628,31 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": {}, - "type": "object" - } - } - }, "description": "OK" } }, "security": [ { - "PATAuth": [] - }, - { - "BearerAuth": [] + "CookieAuth": [] } ], - "summary": "Proxy npm registry API request", + "summary": "GitLab OAuth2 login", "tags": [ - "Dependency Firewall" + "Integrations" ] } }, - "/dependency-proxy/{secret}/npm/{package}": { + "/organizations": { "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "npm package name", - "in": "path", - "name": "package", - "schema": { - "type": "string" - } - }, - { - "description": "npm scope", - "in": "path", - "name": "scope", - "schema": { - "type": "string" - } - }, - { - "description": "npm package name (scoped)", - "in": "path", - "name": "name", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "additionalProperties": {}, - "type": "object" + "items": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org" + }, + "type": "array" } } }, @@ -16738,6 +16660,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -16745,54 +16670,31 @@ "BearerAuth": [] } ], - "summary": "Proxy npm package metadata", + "summary": "List organizations", "tags": [ - "Dependency Firewall" + "Organizations" ] - } - }, - "/dependency-proxy/{secret}/npm/{package}/-/{path}": { - "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "npm package name", - "in": "path", - "name": "package", - "schema": { - "type": "string" - } - }, - { - "description": "npm scope", - "in": "path", - "name": "scope", - "schema": { - "type": "string" + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.OrgCreateRequest", + "summary": "body", + "description": "Request body" + } } }, - { - "description": "npm package name (scoped)", - "in": "path", - "name": "name", - "schema": { - "type": "string" - } - } - ], + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org" } } }, @@ -16800,6 +16702,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -16807,43 +16712,53 @@ "BearerAuth": [] } ], - "summary": "Proxy npm tarball download", + "summary": "Create organization", "tags": [ - "Dependency Firewall" + "Organizations" ] } }, - "/dependency-proxy/{secret}/npm/{scope}/{name}": { - "get": { + "/organizations/{organization}": { + "delete": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Organization slug", "in": "path", - "name": "secret", + "name": "organization", + "required": true, "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ { - "description": "npm package name", - "in": "path", - "name": "package", - "schema": { - "type": "string" - } + "CookieAuth": [] }, { - "description": "npm scope", - "in": "path", - "name": "scope", - "schema": { - "type": "string" - } + "PATAuth": [] }, { - "description": "npm package name (scoped)", + "BearerAuth": [] + } + ], + "summary": "Delete organization", + "tags": [ + "Organizations" + ] + }, + "get": { + "parameters": [ + { + "description": "Organization slug", "in": "path", - "name": "name", + "name": "organization", + "required": true, "schema": { "type": "string" } @@ -16854,8 +16769,7 @@ "content": { "application/json": { "schema": { - "additionalProperties": {}, - "type": "object" + "$ref": "#/components/schemas/dtos.OrgDetailsDTO" } } }, @@ -16863,6 +16777,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -16870,54 +16787,42 @@ "BearerAuth": [] } ], - "summary": "Proxy npm package metadata", + "summary": "Get organization details", "tags": [ - "Dependency Firewall" + "Organizations" ] - } - }, - "/dependency-proxy/{secret}/npm/{scope}/{name}/-/{path}": { - "get": { + }, + "patch": { "parameters": [ { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "npm package name", - "in": "path", - "name": "package", - "schema": { - "type": "string" - } - }, - { - "description": "npm scope", - "in": "path", - "name": "scope", - "schema": { - "type": "string" - } - }, - { - "description": "npm package name (scoped)", + "description": "Organization slug", "in": "path", - "name": "name", + "name": "organization", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.OrgPatchRequest", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/dtos.OrgDetailsDTO" } } }, @@ -16925,6 +16830,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -16932,19 +16840,20 @@ "BearerAuth": [] } ], - "summary": "Proxy npm tarball download", + "summary": "Update organization", "tags": [ - "Dependency Firewall" + "Organizations" ] } }, - "/dependency-proxy/{secret}/pypi/packages/{path}": { + "/organizations/{organization}/compliance-postures": { "get": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Organization slug", "in": "path", - "name": "secret", + "name": "organization", + "required": true, "schema": { "type": "string" } @@ -16955,7 +16864,7 @@ "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO" } } }, @@ -16963,6 +16872,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -16970,27 +16882,28 @@ "BearerAuth": [] } ], - "summary": "Proxy PyPI package download", + "summary": "List compliance postures paged", "tags": [ - "Dependency Firewall" + "Compliance Postures" ] } }, - "/dependency-proxy/{secret}/pypi/simple/{package}": { - "get": { + "/organizations/{organization}/compliance-postures/components/{statementID}/": { + "delete": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Organization slug", "in": "path", - "name": "secret", - "schema": { + "name": "organization", + "required": true, + "schema": { "type": "string" } }, { - "description": "PyPI package name", + "description": "Statement ID", "in": "path", - "name": "package", + "name": "statementID", "required": true, "schema": { "type": "string" @@ -17002,14 +16915,17 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "object" } } }, - "description": "HTML simple index" + "description": "OK" } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -17017,106 +16933,51 @@ "BearerAuth": [] } ], - "summary": "Proxy PyPI simple index metadata", + "summary": "Delete a compliance statement", "tags": [ - "Dependency Firewall" + "Compliance Components" ] - } - }, - "/health": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "OK" + }, + "put": { + "parameters": [ + { + "description": "Organization slug", + "in": "path", + "name": "organization", + "required": true, + "schema": { + "type": "string" + } }, - "503": { - "content": { - "application/json": { - "schema": { - "properties": { - "error": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "description": "Service Unavailable" - } - }, - "summary": "Liveness and readiness check", - "tags": [ - "System" - ] - } - }, - "/info": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.InfoResponse" - } - } - }, - "description": "OK" + { + "description": "Statement ID", + "in": "path", + "name": "statementID", + "required": true, + "schema": { + "type": "string" + } } - }, - "summary": "Runtime, build and database diagnostics", - "tags": [ - "System" - ] - } - }, - "/instance-settings": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.InstanceSettingsDTO" - } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.statementPayload", + "summary": "body", + "description": "Request body" } - }, - "description": "OK" - } + } + }, + "description": "Request body", + "required": true }, - "summary": "Get public instance settings", - "tags": [ - "Admin" - ] - } - }, - "/integrations/repositories": { - "get": { "responses": { "200": { "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.GitRepository" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" } } }, @@ -17134,28 +16995,19 @@ "BearerAuth": [] } ], - "summary": "List repositories from integrations for the session", + "summary": "Update a compliance statement", "tags": [ - "Integrations" + "Compliance Components" ] } }, - "/lookup": { + "/organizations/{organization}/compliance-postures/oscal": { "get": { "parameters": [ { - "description": "Provider name", - "in": "query", - "name": "provider", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Repository ID", - "in": "query", - "name": "id", + "description": "Organization slug", + "in": "path", + "name": "organization", "required": true, "schema": { "type": "string" @@ -17167,26 +17019,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.LookupResponse" + "type": "object" } } }, "description": "OK" } }, - "summary": "Lookup asset by provider", + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + }, + { + "BearerAuth": [] + } + ], + "summary": "Get OSCAL system security plan", "tags": [ - "Assets" + "Compliance Postures" ] } }, - "/oauth2/gitlab/callback/{integrationName}": { + "/organizations/{organization}/compliance-postures/stats": { "get": { "parameters": [ { - "description": "Integration name", + "description": "Organization slug", "in": "path", - "name": "integrationName", + "name": "organization", "required": true, "schema": { "type": "string" @@ -17195,60 +17058,61 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.CompliancePostureStatsDTO" + } + } + }, "description": "OK" } }, "security": [ { "CookieAuth": [] + }, + { + "PATAuth": [] + }, + { + "BearerAuth": [] } ], - "summary": "GitLab OAuth2 callback", + "summary": "Get compliance posture stats", "tags": [ - "Integrations" + "Compliance Postures" ] } }, - "/oauth2/gitlab/{integrationName}": { + "/organizations/{organization}/compliance-postures/{frameworkControlID}": { "get": { "parameters": [ { - "description": "Integration name", + "description": "Organization slug", "in": "path", - "name": "integrationName", + "name": "organization", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ + }, { - "CookieAuth": [] + "description": "Framework Control ID", + "in": "path", + "name": "frameworkControlID", + "required": true, + "schema": { + "type": "string" + } } ], - "summary": "GitLab OAuth2 login", - "tags": [ - "Integrations" - ] - } - }, - "/organizations": { - "get": { "responses": { "200": { "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" } } }, @@ -17266,31 +17130,58 @@ "BearerAuth": [] } ], - "summary": "List organizations", + "summary": "Get compliance posture for a framework control", "tags": [ - "Organizations" + "Compliance Postures" ] }, "post": { - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.OrgCreateRequest", - "summary": "body", - "description": "Request body" - } + "parameters": [ + { + "description": "Organization slug", + "in": "path", + "name": "organization", + "required": true, + "schema": { + "type": "string" } }, - "description": "Request body", - "required": true + { + "description": "Framework Control ID", + "in": "path", + "name": "frameworkControlID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "justification": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "title": "body", + "type": "object" + } + } + }, + "description": "Event data", + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org" + "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" } } }, @@ -17308,14 +17199,14 @@ "BearerAuth": [] } ], - "summary": "Create organization", + "summary": "Create a compliance posture event", "tags": [ - "Organizations" + "Compliance Postures" ] } }, - "/organizations/{organization}": { - "delete": { + "/organizations/{organization}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -17325,75 +17216,20 @@ "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] }, { - "BearerAuth": [] - } - ], - "summary": "Delete organization", - "tags": [ - "Organizations" - ] - }, - "get": { - "parameters": [ - { - "description": "Organization slug", + "description": "Framework control ID", "in": "path", - "name": "organization", + "name": "frameworkControlID", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.OrgDetailsDTO" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] }, { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get organization details", - "tags": [ - "Organizations" - ] - }, - "patch": { - "parameters": [ - { - "description": "Organization slug", + "description": "Compliance component ID", "in": "path", - "name": "organization", + "name": "complianceComponentID", "required": true, "schema": { "type": "string" @@ -17404,7 +17240,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.OrgPatchRequest", + "$ref": "#/components/schemas/controllers.statementPayload", "summary": "body", "description": "Request body" } @@ -17414,15 +17250,15 @@ "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.OrgDetailsDTO" + "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -17436,13 +17272,13 @@ "BearerAuth": [] } ], - "summary": "Update organization", + "summary": "Create a compliance statement for a component", "tags": [ - "Organizations" + "Compliance Components" ] } }, - "/organizations/{organization}/compliance-postures": { + "/organizations/{organization}/components": { "get": { "parameters": [ { @@ -17453,6 +17289,30 @@ "schema": { "type": "string" } + }, + { + "description": "Page number", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "Page size", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" + } + }, + { + "description": "Search term", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } } ], "responses": { @@ -17460,7 +17320,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO" } } }, @@ -17478,14 +17338,14 @@ "BearerAuth": [] } ], - "summary": "List compliance postures paged", + "summary": "Search component occurrences within an organization", "tags": [ - "Compliance Postures" + "Components" ] } }, - "/organizations/{organization}/compliance-postures/components/{statementID}/": { - "delete": { + "/organizations/{organization}/config-files/{config-file}": { + "get": { "parameters": [ { "description": "Organization slug", @@ -17497,9 +17357,9 @@ } }, { - "description": "Statement ID", + "description": "Config file ID", "in": "path", - "name": "statementID", + "name": "config-file", "required": true, "schema": { "type": "string" @@ -17509,13 +17369,13 @@ "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { - "type": "object" + "type": "string" } } }, - "description": "OK" + "description": "Config file content" } }, "security": [ @@ -17529,9 +17389,9 @@ "BearerAuth": [] } ], - "summary": "Delete a compliance statement", + "summary": "Get organization config file", "tags": [ - "Compliance Components" + "Organizations" ] }, "put": { @@ -17546,9 +17406,9 @@ } }, { - "description": "Statement ID", + "description": "Config file ID", "in": "path", - "name": "statementID", + "name": "config-file", "required": true, "schema": { "type": "string" @@ -17557,27 +17417,26 @@ ], "requestBody": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/controllers.statementPayload", - "summary": "body", - "description": "Request body" + "title": "body", + "type": "string" } } }, - "description": "Request body", + "description": "Config file content", "required": true }, "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" + "type": "string" } } }, - "description": "OK" + "description": "Updated config file content" } }, "security": [ @@ -17591,13 +17450,13 @@ "BearerAuth": [] } ], - "summary": "Update a compliance statement", + "summary": "Update organization config file", "tags": [ - "Compliance Components" + "Organizations" ] } }, - "/organizations/{organization}/compliance-postures/oscal": { + "/organizations/{organization}/content-tree": { "get": { "parameters": [ { @@ -17615,7 +17474,10 @@ "content": { "application/json": { "schema": { - "type": "object" + "items": { + "$ref": "#/components/schemas/dtos.ProjectDTO" + }, + "type": "array" } } }, @@ -17633,13 +17495,13 @@ "BearerAuth": [] } ], - "summary": "Get OSCAL system security plan", + "summary": "Get organization content tree", "tags": [ - "Compliance Postures" + "Organizations" ] } }, - "/organizations/{organization}/compliance-postures/stats": { + "/organizations/{organization}/csaf/openpgp": { "get": { "parameters": [ { @@ -17657,7 +17519,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureStatsDTO" + "type": "string" } } }, @@ -17675,13 +17537,13 @@ "BearerAuth": [] } ], - "summary": "Get compliance posture stats", + "summary": "Get CSAF OpenPGP keys HTML", "tags": [ - "Compliance Postures" + "CSAF" ] } }, - "/organizations/{organization}/compliance-postures/{frameworkControlID}": { + "/organizations/{organization}/csaf/openpgp/{file}": { "get": { "parameters": [ { @@ -17694,9 +17556,9 @@ } }, { - "description": "Framework Control ID", + "description": "File name", "in": "path", - "name": "frameworkControlID", + "name": "file", "required": true, "schema": { "type": "string" @@ -17708,7 +17570,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" + "type": "string" } } }, @@ -17726,12 +17588,14 @@ "BearerAuth": [] } ], - "summary": "Get compliance posture for a framework control", + "summary": "Get CSAF OpenPGP key or hash file", "tags": [ - "Compliance Postures" + "CSAF" ] - }, - "post": { + } + }, + "/organizations/{organization}/csaf/provider-metadata.json": { + "get": { "parameters": [ { "description": "Organization slug", @@ -17741,43 +17605,14 @@ "schema": { "type": "string" } - }, - { - "description": "Framework Control ID", - "in": "path", - "name": "frameworkControlID", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "justification": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Event data", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" + "type": "object" } } }, @@ -17795,66 +17630,88 @@ "BearerAuth": [] } ], - "summary": "Create a compliance posture event", + "summary": "Get CSAF provider metadata for organization", "tags": [ - "Compliance Postures" + "CSAF" ] } }, - "/organizations/{organization}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}/": { - "post": { + "/organizations/{organization}/dependency-proxy-urls/": { + "get": { "parameters": [ { - "description": "Organization slug", + "description": "organization slug", "in": "path", "name": "organization", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "CookieAuth": [] }, { - "description": "Framework control ID", + "PATAuth": [] + }, + { + "BearerAuth": [] + } + ], + "summary": "Get organization dependency proxy URLs", + "tags": [ + "Dependency Firewall" + ] + } + }, + "/organizations/{organization}/dependency-vulns": { + "get": { + "parameters": [ + { + "description": "Organization slug", "in": "path", - "name": "frameworkControlID", + "name": "organization", "required": true, "schema": { "type": "string" } }, { - "description": "Compliance component ID", - "in": "path", - "name": "complianceComponentID", - "required": true, + "description": "Search term", + "in": "query", + "name": "search", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/controllers.statementPayload", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" + "type": "object" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -17868,13 +17725,13 @@ "BearerAuth": [] } ], - "summary": "Create a compliance statement for a component", + "summary": "List dependency vulnerabilities by organization", "tags": [ - "Compliance Components" + "Vulnerabilities" ] } }, - "/organizations/{organization}/components": { + "/organizations/{organization}/first-party-vulns": { "get": { "parameters": [ { @@ -17886,22 +17743,6 @@ "type": "string" } }, - { - "description": "Page number", - "in": "query", - "name": "page", - "schema": { - "type": "integer" - } - }, - { - "description": "Page size", - "in": "query", - "name": "pageSize", - "schema": { - "type": "integer" - } - }, { "description": "Search term", "in": "query", @@ -17916,7 +17757,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO" + "type": "object" } } }, @@ -17934,13 +17775,13 @@ "BearerAuth": [] } ], - "summary": "Search component occurrences within an organization", + "summary": "List first-party vulnerabilities by organization", "tags": [ - "Components" + "Vulnerabilities" ] } }, - "/organizations/{organization}/config-files/{config-file}": { + "/organizations/{organization}/integrations/finish-installation/": { "get": { "parameters": [ { @@ -17953,10 +17794,9 @@ } }, { - "description": "Config file ID", - "in": "path", - "name": "config-file", - "required": true, + "description": "Third party installation id", + "in": "query", + "name": "installationId", "schema": { "type": "string" } @@ -17965,13 +17805,13 @@ "responses": { "200": { "content": { - "text/plain": { + "application/json": { "schema": { "type": "string" } } }, - "description": "Config file content" + "description": "OK" } }, "security": [ @@ -17985,12 +17825,14 @@ "BearerAuth": [] } ], - "summary": "Get organization config file", + "summary": "Finish a third-party integration installation", "tags": [ - "Organizations" + "Integrations" ] - }, - "put": { + } + }, + "/organizations/{organization}/integrations/gitlab/test-and-save/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -18000,39 +17842,41 @@ "schema": { "type": "string" } - }, - { - "description": "Config file ID", - "in": "path", - "name": "config-file", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { "content": { - "text/plain": { + "application/json": { "schema": { + "properties": { + "name": { + "type": "string" + }, + "token": { + "type": "string" + }, + "url": { + "type": "string" + } + }, "title": "body", - "type": "string" + "type": "object" } } }, - "description": "Config file content", + "description": "GitLab credentials", "required": true }, "responses": { "200": { "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.GitlabIntegrationDTO" } } }, - "description": "Updated config file content" + "description": "OK" } }, "security": [ @@ -18046,14 +17890,14 @@ "BearerAuth": [] } ], - "summary": "Update organization config file", + "summary": "Test and save GitLab integration credentials", "tags": [ - "Organizations" + "Integrations" ] } }, - "/organizations/{organization}/content-tree": { - "get": { + "/organizations/{organization}/integrations/gitlab/{gitlab_integration_id}/": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -18063,20 +17907,19 @@ "schema": { "type": "string" } + }, + { + "description": "GitLab integration ID", + "in": "path", + "name": "gitlab_integration_id", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/dtos.ProjectDTO" - }, - "type": "array" - } - } - }, "description": "OK" } }, @@ -18091,14 +17934,14 @@ "BearerAuth": [] } ], - "summary": "Get organization content tree", + "summary": "Delete a GitLab integration access token", "tags": [ - "Organizations" + "Integrations" ] } }, - "/organizations/{organization}/csaf/openpgp": { - "get": { + "/organizations/{organization}/integrations/jira/test-and-save/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -18110,12 +17953,38 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "type": "string" + }, + "token": { + "type": "string" + }, + "url": { + "type": "string" + }, + "userEmail": { + "type": "string" + } + }, + "title": "body", + "type": "object" + } + } + }, + "description": "Jira credentials", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.JiraIntegrationDTO" } } }, @@ -18133,14 +18002,14 @@ "BearerAuth": [] } ], - "summary": "Get CSAF OpenPGP keys HTML", + "summary": "Test and save Jira integration credentials", "tags": [ - "CSAF" + "Integrations" ] } }, - "/organizations/{organization}/csaf/openpgp/{file}": { - "get": { + "/organizations/{organization}/integrations/jira/{jira_integration_id}/": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -18152,9 +18021,9 @@ } }, { - "description": "File name", + "description": "Jira integration ID", "in": "path", - "name": "file", + "name": "jira_integration_id", "required": true, "schema": { "type": "string" @@ -18163,13 +18032,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, "description": "OK" } }, @@ -18184,13 +18046,13 @@ "BearerAuth": [] } ], - "summary": "Get CSAF OpenPGP key or hash file", + "summary": "Delete a Jira integration access token", "tags": [ - "CSAF" + "Integrations" ] } }, - "/organizations/{organization}/csaf/provider-metadata.json": { + "/organizations/{organization}/integrations/repositories": { "get": { "parameters": [ { @@ -18208,7 +18070,10 @@ "content": { "application/json": { "schema": { - "type": "object" + "items": { + "$ref": "#/components/schemas/dtos.GitRepository" + }, + "type": "array" } } }, @@ -18226,17 +18091,17 @@ "BearerAuth": [] } ], - "summary": "Get CSAF provider metadata for organization", + "summary": "List repositories from integrations for an organization", "tags": [ - "CSAF" + "Integrations" ] } }, - "/organizations/{organization}/dependency-proxy-urls/": { - "get": { + "/organizations/{organization}/integrations/webhook/test": { + "post": { "parameters": [ { - "description": "organization slug", + "description": "Organization slug", "in": "path", "name": "organization", "required": true, @@ -18245,13 +18110,31 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.WebhookTestRequestDTO", + "summary": "body", + "description": "Test webhook data" + } + } + }, + "description": "Test webhook data", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "additionalProperties": { - "type": "string" + "properties": { + "message": { + "type": "string" + }, + "payloadType": { + "type": "string" + } }, "type": "object" } @@ -18271,14 +18154,14 @@ "BearerAuth": [] } ], - "summary": "Get organization dependency proxy URLs", + "summary": "Test webhook integration (org)", "tags": [ - "Dependency Firewall" + "Webhooks" ] } }, - "/organizations/{organization}/dependency-vulns": { - "get": { + "/organizations/{organization}/integrations/webhook/test-and-save": { + "post": { "parameters": [ { "description": "Organization slug", @@ -18288,22 +18171,27 @@ "schema": { "type": "string" } - }, - { - "description": "Search term", - "in": "query", - "name": "search", - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.WebhookCreateRequestDTO", + "summary": "body", + "description": "Webhook data" + } + } + }, + "description": "Webhook data", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" } } }, @@ -18321,14 +18209,14 @@ "BearerAuth": [] } ], - "summary": "List dependency vulnerabilities by organization", + "summary": "Create webhook integration (org)", "tags": [ - "Vulnerabilities" + "Webhooks" ] } }, - "/organizations/{organization}/first-party-vulns": { - "get": { + "/organizations/{organization}/integrations/webhook/{id}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -18340,9 +18228,10 @@ } }, { - "description": "Search term", - "in": "query", - "name": "search", + "description": "Webhook ID", + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } @@ -18350,13 +18239,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, "description": "OK" } }, @@ -18371,14 +18253,12 @@ "BearerAuth": [] } ], - "summary": "List first-party vulnerabilities by organization", + "summary": "Delete webhook integration (org)", "tags": [ - "Vulnerabilities" + "Webhooks" ] - } - }, - "/organizations/{organization}/integrations/finish-installation/": { - "get": { + }, + "put": { "parameters": [ { "description": "Organization slug", @@ -18390,20 +18270,34 @@ } }, { - "description": "Third party installation id", - "in": "query", - "name": "installationId", + "description": "Webhook ID", + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.WebhookUpdateRequestDTO", + "summary": "body", + "description": "Webhook data" + } + } + }, + "description": "Webhook data", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" } } }, @@ -18421,14 +18315,14 @@ "BearerAuth": [] } ], - "summary": "Finish a third-party integration installation", + "summary": "Update webhook integration (org)", "tags": [ - "Integrations" + "Webhooks" ] } }, - "/organizations/{organization}/integrations/gitlab/test-and-save/": { - "post": { + "/organizations/{organization}/invitation/{ID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -18438,40 +18332,19 @@ "schema": { "type": "string" } + }, + { + "description": "Invitation ID", + "in": "path", + "name": "ID", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string" - }, - "token": { - "type": "string" - }, - "url": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "GitLab credentials", - "required": true - }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.GitlabIntegrationDTO" - } - } - }, "description": "OK" } }, @@ -18486,14 +18359,14 @@ "BearerAuth": [] } ], - "summary": "Test and save GitLab integration credentials", + "summary": "Revoke an organization invitation", "tags": [ - "Integrations" + "Organizations" ] } }, - "/organizations/{organization}/integrations/gitlab/{gitlab_integration_id}/": { - "delete": { + "/organizations/{organization}/logs/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -18505,10 +18378,41 @@ } }, { - "description": "GitLab integration ID", - "in": "path", - "name": "gitlab_integration_id", - "required": true, + "description": "Page number", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "Page size", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" + } + }, + { + "description": "Search term", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "description": "Sort query, e.g. sort[createdAt]=desc", + "in": "query", + "name": "sort", + "schema": { + "type": "string" + } + }, + { + "description": "Filter query, e.g. filterQuery[logs.log_level][is]=error", + "in": "query", + "name": "filterQuery", "schema": { "type": "string" } @@ -18516,6 +18420,13 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO" + } + } + }, "description": "OK" } }, @@ -18530,14 +18441,14 @@ "BearerAuth": [] } ], - "summary": "Delete a GitLab integration access token", + "summary": "List organization logs", "tags": [ - "Integrations" + "Logs" ] } }, - "/organizations/{organization}/integrations/jira/test-and-save/": { - "post": { + "/organizations/{organization}/members": { + "get": { "parameters": [ { "description": "Organization slug", @@ -18549,38 +18460,15 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string" - }, - "token": { - "type": "string" - }, - "url": { - "type": "string" - }, - "userEmail": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Jira credentials", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.JiraIntegrationDTO" + "items": { + "type": "object" + }, + "type": "array" } } }, @@ -18598,14 +18486,12 @@ "BearerAuth": [] } ], - "summary": "Test and save Jira integration credentials", + "summary": "List organization members", "tags": [ - "Integrations" + "Organizations" ] - } - }, - "/organizations/{organization}/integrations/jira/{jira_integration_id}/": { - "delete": { + }, + "post": { "parameters": [ { "description": "Organization slug", @@ -18615,19 +18501,30 @@ "schema": { "type": "string" } - }, - { - "description": "Jira integration ID", - "in": "path", - "name": "jira_integration_id", - "required": true, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.InviteRequest", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Invitation" + } + } + }, "description": "OK" } }, @@ -18642,14 +18539,14 @@ "BearerAuth": [] } ], - "summary": "Delete a Jira integration access token", + "summary": "Invite member to organization", "tags": [ - "Integrations" + "Organizations" ] } }, - "/organizations/{organization}/integrations/repositories": { - "get": { + "/organizations/{organization}/members/{userID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -18659,20 +18556,19 @@ "schema": { "type": "string" } + }, + { + "description": "User ID", + "in": "path", + "name": "userID", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/dtos.GitRepository" - }, - "type": "array" - } - } - }, "description": "OK" } }, @@ -18687,14 +18583,12 @@ "BearerAuth": [] } ], - "summary": "List repositories from integrations for an organization", + "summary": "Remove member from organization", "tags": [ - "Integrations" + "Organizations" ] - } - }, - "/organizations/{organization}/integrations/webhook/test": { - "post": { + }, + "put": { "parameters": [ { "description": "Organization slug", @@ -18704,38 +18598,32 @@ "schema": { "type": "string" } + }, + { + "description": "User ID", + "in": "path", + "name": "userID", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.WebhookTestRequestDTO", + "$ref": "#/components/schemas/dtos.OrgChangeRoleRequest", "summary": "body", - "description": "Test webhook data" + "description": "Request body" } } }, - "description": "Test webhook data", + "description": "Request body", "required": true }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - }, - "payloadType": { - "type": "string" - } - }, - "type": "object" - } - } - }, "description": "OK" } }, @@ -18750,14 +18638,14 @@ "BearerAuth": [] } ], - "summary": "Test webhook integration (org)", + "summary": "Change member role", "tags": [ - "Webhooks" + "Organizations" ] } }, - "/organizations/{organization}/integrations/webhook/test-and-save": { - "post": { + "/organizations/{organization}/metrics": { + "get": { "parameters": [ { "description": "Organization slug", @@ -18769,25 +18657,17 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.WebhookCreateRequestDTO", - "summary": "body", - "description": "Webhook data" - } - } - }, - "description": "Webhook data", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" + "properties": { + "ownerId": { + "type": "string" + } + }, + "type": "object" } } }, @@ -18805,14 +18685,14 @@ "BearerAuth": [] } ], - "summary": "Create webhook integration (org)", + "summary": "Get organization metrics", "tags": [ - "Webhooks" + "Organizations" ] } }, - "/organizations/{organization}/integrations/webhook/{id}": { - "delete": { + "/organizations/{organization}/pats": { + "get": { "parameters": [ { "description": "Organization slug", @@ -18822,19 +18702,20 @@ "schema": { "type": "string" } - }, - { - "description": "Webhook ID", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/dtos.PATDTO" + }, + "type": "array" + } + } + }, "description": "OK" } }, @@ -18849,12 +18730,12 @@ "BearerAuth": [] } ], - "summary": "Delete webhook integration (org)", + "summary": "List organization access tokens", "tags": [ - "Webhooks" + "Authentication" ] }, - "put": { + "post": { "parameters": [ { "description": "Organization slug", @@ -18864,28 +18745,19 @@ "schema": { "type": "string" } - }, - { - "description": "Webhook ID", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.WebhookUpdateRequestDTO", + "$ref": "#/components/schemas/dtos.PatCreateRequest", "summary": "body", - "description": "Webhook data" + "description": "Request body" } } }, - "description": "Webhook data", + "description": "Request body", "required": true }, "responses": { @@ -18893,7 +18765,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" + "$ref": "#/components/schemas/dtos.PATCreateResponseDTO" } } }, @@ -18911,13 +18783,13 @@ "BearerAuth": [] } ], - "summary": "Update webhook integration (org)", + "summary": "Create organization access token", "tags": [ - "Webhooks" + "Authentication" ] } }, - "/organizations/{organization}/invitation/{ID}": { + "/organizations/{organization}/pats/{tokenID}": { "delete": { "parameters": [ { @@ -18930,9 +18802,9 @@ } }, { - "description": "Invitation ID", + "description": "Token ID", "in": "path", - "name": "ID", + "name": "tokenID", "required": true, "schema": { "type": "string" @@ -18955,13 +18827,13 @@ "BearerAuth": [] } ], - "summary": "Revoke an organization invitation", + "summary": "Delete organization access token", "tags": [ - "Organizations" + "Authentication" ] } }, - "/organizations/{organization}/logs/": { + "/organizations/{organization}/policies": { "get": { "parameters": [ { @@ -18972,46 +18844,6 @@ "schema": { "type": "string" } - }, - { - "description": "Page number", - "in": "query", - "name": "page", - "schema": { - "type": "integer" - } - }, - { - "description": "Page size", - "in": "query", - "name": "pageSize", - "schema": { - "type": "integer" - } - }, - { - "description": "Search term", - "in": "query", - "name": "search", - "schema": { - "type": "string" - } - }, - { - "description": "Sort query, e.g. sort[createdAt]=desc", - "in": "query", - "name": "sort", - "schema": { - "type": "string" - } - }, - { - "description": "Filter query, e.g. filterQuery[logs.log_level][is]=error", - "in": "query", - "name": "filterQuery", - "schema": { - "type": "string" - } } ], "responses": { @@ -19019,7 +18851,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO" + "items": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" + }, + "type": "array" } } }, @@ -19037,14 +18872,12 @@ "BearerAuth": [] } ], - "summary": "List organization logs", + "summary": "List organization policies", "tags": [ - "Logs" + "Policies" ] - } - }, - "/organizations/{organization}/members": { - "get": { + }, + "post": { "parameters": [ { "description": "Organization slug", @@ -19056,19 +18889,29 @@ } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "type": "object" - }, - "type": "array" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.PolicyDTO", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.PolicyDTO" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -19082,12 +18925,14 @@ "BearerAuth": [] } ], - "summary": "List organization members", + "summary": "Create a policy", "tags": [ - "Organizations" + "Policies" ] - }, - "post": { + } + }, + "/organizations/{organization}/policies/{policyID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -19097,31 +18942,20 @@ "schema": { "type": "string" } + }, + { + "description": "Policy ID", + "in": "path", + "name": "policyID", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.InviteRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Invitation" - } - } - }, - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -19135,14 +18969,12 @@ "BearerAuth": [] } ], - "summary": "Invite member to organization", + "summary": "Delete a policy", "tags": [ - "Organizations" + "Policies" ] - } - }, - "/organizations/{organization}/members/{userID}": { - "delete": { + }, + "get": { "parameters": [ { "description": "Organization slug", @@ -19154,9 +18986,9 @@ } }, { - "description": "User ID", + "description": "Policy ID", "in": "path", - "name": "userID", + "name": "policyID", "required": true, "schema": { "type": "string" @@ -19165,6 +18997,13 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" + } + } + }, "description": "OK" } }, @@ -19179,9 +19018,9 @@ "BearerAuth": [] } ], - "summary": "Remove member from organization", + "summary": "Get a policy", "tags": [ - "Organizations" + "Policies" ] }, "put": { @@ -19196,9 +19035,9 @@ } }, { - "description": "User ID", + "description": "Policy ID", "in": "path", - "name": "userID", + "name": "policyID", "required": true, "schema": { "type": "string" @@ -19209,7 +19048,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.OrgChangeRoleRequest", + "$ref": "#/components/schemas/dtos.PolicyDTO", "summary": "body", "description": "Request body" } @@ -19220,6 +19059,13 @@ }, "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" + } + } + }, "description": "OK" } }, @@ -19234,13 +19080,13 @@ "BearerAuth": [] } ], - "summary": "Change member role", + "summary": "Update a policy", "tags": [ - "Organizations" + "Policies" ] } }, - "/organizations/{organization}/metrics": { + "/organizations/{organization}/projects": { "get": { "parameters": [ { @@ -19251,6 +19097,30 @@ "schema": { "type": "string" } + }, + { + "description": "Page number", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "Page size", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" + } + }, + { + "description": "Search query", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } } ], "responses": { @@ -19258,12 +19128,7 @@ "content": { "application/json": { "schema": { - "properties": { - "ownerId": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Project" } } }, @@ -19281,14 +19146,12 @@ "BearerAuth": [] } ], - "summary": "Get organization metrics", + "summary": "List projects", "tags": [ - "Organizations" + "Projects" ] - } - }, - "/organizations/{organization}/pats": { - "get": { + }, + "post": { "parameters": [ { "description": "Organization slug", @@ -19300,15 +19163,25 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.ProjectCreateRequest", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.PATDTO" - }, - "type": "array" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Project" } } }, @@ -19326,12 +19199,14 @@ "BearerAuth": [] } ], - "summary": "List organization access tokens", + "summary": "Create project", "tags": [ - "Authentication" + "Projects" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/search/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -19341,27 +19216,38 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.PatCreateRequest", - "summary": "body", - "description": "Request body" - } + }, + { + "description": "Search query", + "in": "query", + "name": "search", + "schema": { + "type": "string" } }, - "description": "Request body", - "required": true - }, + { + "description": "Page number", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "Page size", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.PATCreateResponseDTO" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectDTO" } } }, @@ -19379,13 +19265,13 @@ "BearerAuth": [] } ], - "summary": "Create organization access token", + "summary": "Search projects with sub-projects and assets", "tags": [ - "Authentication" + "Projects" ] } }, - "/organizations/{organization}/pats/{tokenID}": { + "/organizations/{organization}/projects/{projectSlug}": { "delete": { "parameters": [ { @@ -19398,9 +19284,9 @@ } }, { - "description": "Token ID", + "description": "Project slug", "in": "path", - "name": "tokenID", + "name": "projectSlug", "required": true, "schema": { "type": "string" @@ -19423,13 +19309,11 @@ "BearerAuth": [] } ], - "summary": "Delete organization access token", + "summary": "Delete project", "tags": [ - "Authentication" + "Projects" ] - } - }, - "/organizations/{organization}/policies": { + }, "get": { "parameters": [ { @@ -19440,6 +19324,15 @@ "schema": { "type": "string" } + }, + { + "description": "Project slug", + "in": "path", + "name": "projectSlug", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -19447,10 +19340,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.ProjectDetailsDTO" } } }, @@ -19468,12 +19358,12 @@ "BearerAuth": [] } ], - "summary": "List organization policies", + "summary": "Get project details", "tags": [ - "Policies" + "Projects" ] }, - "post": { + "patch": { "parameters": [ { "description": "Organization slug", @@ -19483,13 +19373,22 @@ "schema": { "type": "string" } + }, + { + "description": "Project slug", + "in": "path", + "name": "projectSlug", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.PolicyDTO", + "$ref": "#/components/schemas/dtos.ProjectPatchRequest", "summary": "body", "description": "Request body" } @@ -19499,15 +19398,15 @@ "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.PolicyDTO" + "$ref": "#/components/schemas/dtos.ProjectDetailsDTO" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -19521,14 +19420,14 @@ "BearerAuth": [] } ], - "summary": "Create a policy", + "summary": "Update project", "tags": [ - "Policies" + "Projects" ] } }, - "/organizations/{organization}/policies/{policyID}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets": { + "get": { "parameters": [ { "description": "Organization slug", @@ -19540,9 +19439,9 @@ } }, { - "description": "Policy ID", + "description": "Project slug", "in": "path", - "name": "policyID", + "name": "projectSlug", "required": true, "schema": { "type": "string" @@ -19550,8 +19449,18 @@ } ], "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/dtos.AssetDTO" + }, + "type": "array" + } + } + }, + "description": "OK" } }, "security": [ @@ -19565,12 +19474,12 @@ "BearerAuth": [] } ], - "summary": "Delete a policy", + "summary": "List assets", "tags": [ - "Policies" + "Assets" ] }, - "get": { + "post": { "parameters": [ { "description": "Organization slug", @@ -19582,21 +19491,34 @@ } }, { - "description": "Policy ID", + "description": "Project slug", "in": "path", - "name": "policyID", + "name": "projectSlug", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.AssetCreateRequest", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" + "$ref": "#/components/schemas/dtos.AssetDTO" } } }, @@ -19614,12 +19536,14 @@ "BearerAuth": [] } ], - "summary": "Get a policy", + "summary": "Create asset", "tags": [ - "Policies" + "Assets" ] - }, - "put": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -19631,37 +19555,26 @@ } }, { - "description": "Policy ID", + "description": "Project slug", "in": "path", - "name": "policyID", + "name": "projectSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.PolicyDTO", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" - } - } - }, "description": "OK" } }, @@ -19676,13 +19589,11 @@ "BearerAuth": [] } ], - "summary": "Update a policy", + "summary": "Delete asset", "tags": [ - "Policies" + "Assets" ] - } - }, - "/organizations/{organization}/projects": { + }, "get": { "parameters": [ { @@ -19695,25 +19606,19 @@ } }, { - "description": "Page number", - "in": "query", - "name": "page", - "schema": { - "type": "integer" - } - }, - { - "description": "Page size", - "in": "query", - "name": "pageSize", + "description": "Project slug", + "in": "path", + "name": "projectSlug", + "required": true, "schema": { - "type": "integer" + "type": "string" } }, { - "description": "Search query", - "in": "query", - "name": "search", + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, "schema": { "type": "string" } @@ -19724,7 +19629,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Project" + "$ref": "#/components/schemas/dtos.AssetDetailsDTO" } } }, @@ -19742,12 +19647,12 @@ "BearerAuth": [] } ], - "summary": "List projects", + "summary": "Get asset details", "tags": [ - "Projects" + "Assets" ] }, - "post": { + "patch": { "parameters": [ { "description": "Organization slug", @@ -19757,13 +19662,31 @@ "schema": { "type": "string" } + }, + { + "description": "Project slug", + "in": "path", + "name": "projectSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ProjectCreateRequest", + "$ref": "#/components/schemas/dtos.AssetPatchRequest", "summary": "body", "description": "Request body" } @@ -19777,7 +19700,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Project" + "$ref": "#/components/schemas/dtos.AssetDetailsWithSecretsDTO" } } }, @@ -19795,13 +19718,13 @@ "BearerAuth": [] } ], - "summary": "Create project", + "summary": "Update asset", "tags": [ - "Projects" + "Assets" ] } }, - "/organizations/{organization}/projects/search/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/badges/{badge}/": { "get": { "parameters": [ { @@ -19814,61 +19737,53 @@ } }, { - "description": "Search query", - "in": "query", - "name": "search", + "description": "Project slug", + "in": "path", + "name": "projectSlug", + "required": true, "schema": { "type": "string" } }, { - "description": "Page number", - "in": "query", - "name": "page", + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, "schema": { - "type": "integer" + "type": "string" } }, { - "description": "Page size", - "in": "query", - "name": "pageSize", + "description": "Badge type", + "in": "path", + "name": "badge", + "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { "content": { - "application/json": { + "image/svg+xml": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectDTO" + "type": "string" } } }, - "description": "OK" + "description": "SVG badge" } }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Search projects with sub-projects and assets", + "summary": "Get asset badge", "tags": [ - "Projects" + "Assets" ] } }, - "/organizations/{organization}/projects/{projectSlug}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance": { + "get": { "parameters": [ { "description": "Organization slug", @@ -19887,10 +19802,29 @@ "schema": { "type": "string" } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/compliance.PolicyEvaluation" + }, + "type": "array" + } + } + }, "description": "OK" } }, @@ -19905,12 +19839,14 @@ "BearerAuth": [] } ], - "summary": "Delete project", + "summary": "Get asset compliance", "tags": [ - "Projects" + "Compliance" ] - }, - "get": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance/{policy}": { + "get": { "parameters": [ { "description": "Organization slug", @@ -19929,6 +19865,24 @@ "schema": { "type": "string" } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Policy ID", + "in": "path", + "name": "policy", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -19936,7 +19890,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ProjectDetailsDTO" + "$ref": "#/components/schemas/compliance.PolicyEvaluation" } } }, @@ -19954,12 +19908,14 @@ "BearerAuth": [] } ], - "summary": "Get project details", + "summary": "Get policy compliance details for an asset", "tags": [ - "Projects" + "Compliance" ] - }, - "patch": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/components/licenses": { + "get": { "parameters": [ { "description": "Organization slug", @@ -19978,27 +19934,34 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ProjectPatchRequest", - "summary": "body", - "description": "Request body" - } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, + "schema": { + "type": "string" } }, - "description": "Request body", - "required": true - }, + { + "description": "Artifact name", + "in": "query", + "name": "artifact", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ProjectDetailsDTO" + "items": { + "$ref": "#/components/schemas/controllers.licenseResponse" + }, + "type": "array" } } }, @@ -20016,13 +19979,13 @@ "BearerAuth": [] } ], - "summary": "Update project", + "summary": "Get license distribution for an asset", "tags": [ - "Projects" + "Components" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/config-files/{config-file}": { "get": { "parameters": [ { @@ -20042,21 +20005,36 @@ "schema": { "type": "string" } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Config file ID", + "in": "path", + "name": "config-file", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.AssetDTO" - }, - "type": "array" + "type": "string" } } }, - "description": "OK" + "description": "Config file content" } }, "security": [ @@ -20070,12 +20048,12 @@ "BearerAuth": [] } ], - "summary": "List assets", + "summary": "Get asset config file", "tags": [ "Assets" ] }, - "post": { + "put": { "parameters": [ { "description": "Organization slug", @@ -20094,31 +20072,48 @@ "schema": { "type": "string" } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Config file ID", + "in": "path", + "name": "config-file", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/dtos.AssetCreateRequest", - "summary": "body", - "description": "Request body" + "title": "body", + "type": "string" } } }, - "description": "Request body", + "description": "Config file content", "required": true }, "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/dtos.AssetDTO" + "type": "string" } } }, - "description": "OK" + "description": "Updated config file content" } }, "security": [ @@ -20132,14 +20127,14 @@ "BearerAuth": [] } ], - "summary": "Create asset", + "summary": "Update asset config file", "tags": [ "Assets" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf": { + "get": { "parameters": [ { "description": "Organization slug", @@ -20171,6 +20166,13 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, "description": "OK" } }, @@ -20185,11 +20187,13 @@ "BearerAuth": [] } ], - "summary": "Delete asset", + "summary": "Get CSAF directory index HTML", "tags": [ - "Assets" + "CSAF" ] - }, + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white": { "get": { "parameters": [ { @@ -20225,7 +20229,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.AssetDetailsDTO" + "type": "string" } } }, @@ -20243,12 +20247,14 @@ "BearerAuth": [] } ], - "summary": "Get asset details", + "summary": "Get CSAF TLP white directory HTML", "tags": [ - "Assets" + "CSAF" ] - }, - "patch": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/changes.csv": { + "get": { "parameters": [ { "description": "Organization slug", @@ -20278,25 +20284,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.AssetPatchRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.AssetDetailsWithSecretsDTO" + "type": "string" } } }, @@ -20314,13 +20307,13 @@ "BearerAuth": [] } ], - "summary": "Update asset", + "summary": "Get CSAF changes CSV", "tags": [ - "Assets" + "CSAF" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/badges/{badge}/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/index.txt": { "get": { "parameters": [ { @@ -20349,36 +20342,38 @@ "schema": { "type": "string" } - }, - { - "description": "Badge type", - "in": "path", - "name": "badge", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { "content": { - "image/svg+xml": { + "application/json": { "schema": { "type": "string" } } }, - "description": "SVG badge" + "description": "OK" } }, - "summary": "Get asset badge", + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + }, + { + "BearerAuth": [] + } + ], + "summary": "Get CSAF index file", "tags": [ - "Assets" + "CSAF" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}": { "get": { "parameters": [ { @@ -20407,6 +20402,15 @@ "schema": { "type": "string" } + }, + { + "description": "Year", + "in": "path", + "name": "year", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -20414,10 +20418,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/compliance.PolicyEvaluation" - }, - "type": "array" + "type": "string" } } }, @@ -20435,13 +20436,13 @@ "BearerAuth": [] } ], - "summary": "Get asset compliance", + "summary": "Get CSAF reports by year HTML", "tags": [ - "Compliance" + "CSAF" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance/{policy}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}/{version}": { "get": { "parameters": [ { @@ -20472,9 +20473,18 @@ } }, { - "description": "Policy ID", + "description": "Year", "in": "path", - "name": "policy", + "name": "year", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Version filename", + "in": "path", + "name": "version", "required": true, "schema": { "type": "string" @@ -20483,13 +20493,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/compliance.PolicyEvaluation" - } - } - }, "description": "OK" } }, @@ -20504,17 +20507,17 @@ "BearerAuth": [] } ], - "summary": "Get policy compliance details for an asset", + "summary": "Get CSAF report", "tags": [ - "Compliance" + "CSAF" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/components/licenses": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/dependency-proxy-urls/": { "get": { "parameters": [ { - "description": "Organization slug", + "description": "organization slug", "in": "path", "name": "organization", "required": true, @@ -20523,7 +20526,7 @@ } }, { - "description": "Project slug", + "description": "project slug", "in": "path", "name": "projectSlug", "required": true, @@ -20532,21 +20535,13 @@ } }, { - "description": "Asset slug", + "description": "asset slug", "in": "path", "name": "assetSlug", "required": true, "schema": { "type": "string" } - }, - { - "description": "Artifact name", - "in": "query", - "name": "artifact", - "schema": { - "type": "string" - } } ], "responses": { @@ -20554,10 +20549,10 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/controllers.licenseResponse" + "additionalProperties": { + "type": "string" }, - "type": "array" + "type": "object" } } }, @@ -20575,13 +20570,13 @@ "BearerAuth": [] } ], - "summary": "Get license distribution for an asset", + "summary": "Get asset dependency proxy URLs", "tags": [ - "Components" + "Dependency Firewall" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/config-files/{config-file}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references": { "get": { "parameters": [ { @@ -20610,27 +20605,21 @@ "schema": { "type": "string" } - }, - { - "description": "Config file ID", - "in": "path", - "name": "config-file", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "items": { + "$ref": "#/components/schemas/dtos.ExternalReferenceDTO" + }, + "type": "array" } } }, - "description": "Config file content" + "description": "OK" } }, "security": [ @@ -20644,12 +20633,12 @@ "BearerAuth": [] } ], - "summary": "Get asset config file", + "summary": "List external references for an asset", "tags": [ - "Assets" + "ExternalReferences" ] }, - "put": { + "post": { "parameters": [ { "description": "Organization slug", @@ -20677,39 +20666,31 @@ "schema": { "type": "string" } - }, - { - "description": "Config file ID", - "in": "path", - "name": "config-file", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { "content": { - "text/plain": { + "application/json": { "schema": { - "title": "body", - "type": "string" + "$ref": "#/components/schemas/dtos.CreateExternalReferenceRequest", + "summary": "request", + "description": "Create request" } } }, - "description": "Config file content", + "description": "Create request", "required": true }, "responses": { - "200": { + "201": { "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.ExternalReferenceDTO" } } }, - "description": "Updated config file content" + "description": "Created" } }, "security": [ @@ -20723,14 +20704,14 @@ "BearerAuth": [] } ], - "summary": "Update asset config file", + "summary": "Create an external reference", "tags": [ - "Assets" + "ExternalReferences" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/sync": { + "post": { "parameters": [ { "description": "Organization slug", @@ -20762,13 +20743,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, "description": "OK" } }, @@ -20783,14 +20757,14 @@ "BearerAuth": [] } ], - "summary": "Get CSAF directory index HTML", + "summary": "Sync external sources for all artifacts of an asset version", "tags": [ - "CSAF" + "ExternalReferences" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/{url}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -20818,18 +20792,20 @@ "schema": { "type": "string" } + }, + { + "description": "URL-encoded external reference URL", + "in": "path", + "name": "url", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -20843,14 +20819,14 @@ "BearerAuth": [] } ], - "summary": "Get CSAF TLP white directory HTML", + "summary": "Delete an external reference by URL", "tags": [ - "CSAF" + "ExternalReferences" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/changes.csv": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -20880,12 +20856,25 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.CreateInTotoLinkRequest", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.InTotoLink" } } }, @@ -20903,13 +20892,13 @@ "BearerAuth": [] } ], - "summary": "Get CSAF changes CSV", + "summary": "Create an in-toto link", "tags": [ - "CSAF" + "In-toto" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/index.txt": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/root.layout.json/": { "get": { "parameters": [ { @@ -20945,7 +20934,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "file" } } }, @@ -20963,14 +20952,14 @@ "BearerAuth": [] } ], - "summary": "Get CSAF index file", + "summary": "Get the in-toto root layout", "tags": [ - "CSAF" + "In-toto" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/integrations/gitlab/autosetup/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -20998,26 +20987,10 @@ "schema": { "type": "string" } - }, - { - "description": "Year", - "in": "path", - "name": "year", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, "description": "OK" } }, @@ -21032,13 +21005,13 @@ "BearerAuth": [] } ], - "summary": "Get CSAF reports by year HTML", + "summary": "Auto-setup the GitLab integration for an asset", "tags": [ - "CSAF" + "Integrations" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}/{version}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/logs/": { "get": { "parameters": [ { @@ -21069,19 +21042,41 @@ } }, { - "description": "Year", - "in": "path", - "name": "year", - "required": true, + "description": "Page number", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "Page size", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" + } + }, + { + "description": "Search term", + "in": "query", + "name": "search", "schema": { "type": "string" } }, { - "description": "Version filename", - "in": "path", - "name": "version", - "required": true, + "description": "Sort query, e.g. sort[createdAt]=desc", + "in": "query", + "name": "sort", + "schema": { + "type": "string" + } + }, + { + "description": "Filter query, e.g. filterQuery[logs.log_level][is]=error", + "in": "query", + "name": "filterQuery", "schema": { "type": "string" } @@ -21089,6 +21084,13 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO" + } + } + }, "description": "OK" } }, @@ -21103,17 +21105,17 @@ "BearerAuth": [] } ], - "summary": "Get CSAF report", + "summary": "List asset logs", "tags": [ - "CSAF" + "Logs" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/dependency-proxy-urls/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/": { "get": { "parameters": [ { - "description": "organization slug", + "description": "Organization slug", "in": "path", "name": "organization", "required": true, @@ -21122,7 +21124,7 @@ } }, { - "description": "project slug", + "description": "Project slug", "in": "path", "name": "projectSlug", "required": true, @@ -21131,7 +21133,7 @@ } }, { - "description": "asset slug", + "description": "Asset slug", "in": "path", "name": "assetSlug", "required": true, @@ -21142,16 +21144,70 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } + "description": "OK" + } + }, + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + }, + { + "BearerAuth": [] + } + ], + "summary": "List asset members", + "tags": [ + "Assets" + ] + }, + "post": { + "parameters": [ + { + "description": "Organization slug", + "in": "path", + "name": "organization", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Project slug", + "in": "path", + "name": "projectSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.AssetInviteToAssetRequest", + "summary": "body", + "description": "Request body" } - }, + } + }, + "description": "Request body", + "required": true + }, + "responses": { + "200": { "description": "OK" } }, @@ -21166,14 +21222,14 @@ "BearerAuth": [] } ], - "summary": "Get asset dependency proxy URLs", + "summary": "Invite members to asset", "tags": [ - "Dependency Firewall" + "Assets" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/{userID}/": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -21201,20 +21257,19 @@ "schema": { "type": "string" } + }, + { + "description": "User ID", + "in": "path", + "name": "userID", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/dtos.ExternalReferenceDTO" - }, - "type": "array" - } - } - }, "description": "OK" } }, @@ -21229,12 +21284,12 @@ "BearerAuth": [] } ], - "summary": "List external references for an asset", + "summary": "Remove member from asset", "tags": [ - "ExternalReferences" + "Assets" ] }, - "post": { + "put": { "parameters": [ { "description": "Organization slug", @@ -21262,31 +21317,33 @@ "schema": { "type": "string" } + }, + { + "description": "User ID", + "in": "path", + "name": "userID", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CreateExternalReferenceRequest", - "summary": "request", - "description": "Create request" + "$ref": "#/components/schemas/dtos.AssetChangeRoleRequest", + "summary": "body", + "description": "Request body" } } }, - "description": "Create request", + "description": "Request body", "required": true }, "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ExternalReferenceDTO" - } - } - }, - "description": "Created" + "200": { + "description": "OK" } }, "security": [ @@ -21300,14 +21357,14 @@ "BearerAuth": [] } ], - "summary": "Create an external reference", + "summary": "Change role of asset member", "tags": [ - "ExternalReferences" + "Assets" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/sync": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/number-of-exploits/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -21339,6 +21396,16 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.CVE" + }, + "type": "array" + } + } + }, "description": "OK" } }, @@ -21353,14 +21420,14 @@ "BearerAuth": [] } ], - "summary": "Sync external sources for all artifacts of an asset version", + "summary": "Get CVEs with known exploits for an asset", "tags": [ - "ExternalReferences" + "Statistics" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/{url}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats": { + "get": { "parameters": [ { "description": "Organization slug", @@ -21388,20 +21455,21 @@ "schema": { "type": "string" } - }, - { - "description": "URL-encoded external reference URL", - "in": "path", - "name": "url", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/dtos.PATDTO" + }, + "type": "array" + } + } + }, + "description": "OK" } }, "security": [ @@ -21415,13 +21483,11 @@ "BearerAuth": [] } ], - "summary": "Delete an external reference by URL", + "summary": "List asset access tokens", "tags": [ - "ExternalReferences" + "Authentication" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/": { + }, "post": { "parameters": [ { @@ -21456,7 +21522,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CreateInTotoLinkRequest", + "$ref": "#/components/schemas/dtos.PatCreateRequest", "summary": "body", "description": "Request body" } @@ -21470,7 +21536,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.InTotoLink" + "$ref": "#/components/schemas/dtos.PATCreateResponseDTO" } } }, @@ -21488,14 +21554,14 @@ "BearerAuth": [] } ], - "summary": "Create an in-toto link", + "summary": "Create asset access token", "tags": [ - "In-toto" + "Authentication" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/root.layout.json/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats/{tokenID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -21523,17 +21589,19 @@ "schema": { "type": "string" } + }, + { + "description": "Token ID", + "in": "path", + "name": "tokenID", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "type": "file" - } - } - }, "description": "OK" } }, @@ -21548,13 +21616,13 @@ "BearerAuth": [] } ], - "summary": "Get the in-toto root layout", + "summary": "Delete asset access token", "tags": [ - "In-toto" + "Authentication" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/integrations/gitlab/autosetup/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pipeline-trigger/": { "post": { "parameters": [ { @@ -21601,13 +21669,13 @@ "BearerAuth": [] } ], - "summary": "Auto-setup the GitLab integration for an asset", + "summary": "Trigger asset daemon pipeline", "tags": [ - "Integrations" + "Assets" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/logs/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/": { "get": { "parameters": [ { @@ -21636,58 +21704,102 @@ "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/dtos.AssetVersionDTO" + }, + "type": "array" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "CookieAuth": [] }, { - "description": "Page number", - "in": "query", - "name": "page", - "schema": { - "type": "integer" - } + "PATAuth": [] }, { - "description": "Page size", - "in": "query", - "name": "pageSize", - "schema": { - "type": "integer" - } - }, + "BearerAuth": [] + } + ], + "summary": "List asset versions", + "tags": [ + "Asset Versions" + ] + }, + "post": { + "parameters": [ { - "description": "Search term", - "in": "query", - "name": "search", + "description": "Organization slug", + "in": "path", + "name": "organization", + "required": true, "schema": { "type": "string" } }, { - "description": "Sort query, e.g. sort[createdAt]=desc", - "in": "query", - "name": "sort", + "description": "Project slug", + "in": "path", + "name": "projectSlug", + "required": true, "schema": { "type": "string" } }, { - "description": "Filter query, e.g. filterQuery[logs.log_level][is]=error", - "in": "query", - "name": "filterQuery", + "description": "Asset slug", + "in": "path", + "name": "assetSlug", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "defaultBranch": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "boolean" + } + }, + "title": "body", + "type": "object" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO" + "$ref": "#/components/schemas/dtos.AssetVersionDTO" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -21701,14 +21813,14 @@ "BearerAuth": [] } ], - "summary": "List asset logs", + "summary": "Create asset version", "tags": [ - "Logs" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -21736,6 +21848,15 @@ "schema": { "type": "string" } + }, + { + "description": "Asset version slug", + "in": "path", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -21754,12 +21875,12 @@ "BearerAuth": [] } ], - "summary": "List asset members", + "summary": "Delete asset version", "tags": [ - "Assets" + "Asset Versions" ] }, - "post": { + "get": { "parameters": [ { "description": "Organization slug", @@ -21787,23 +21908,26 @@ "schema": { "type": "string" } + }, + { + "description": "Asset version slug", + "in": "path", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.AssetInviteToAssetRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.AssetVersionDTO" + } + } + }, "description": "OK" } }, @@ -21818,14 +21942,14 @@ "BearerAuth": [] } ], - "summary": "Invite members to asset", + "summary": "Get asset version details", "tags": [ - "Assets" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/{userID}/": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -21855,9 +21979,9 @@ } }, { - "description": "User ID", + "description": "Asset version slug", "in": "path", - "name": "userID", + "name": "assetVersionSlug", "required": true, "schema": { "type": "string" @@ -21866,6 +21990,13 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Advisory" + } + } + }, "description": "OK" } }, @@ -21880,12 +22011,12 @@ "BearerAuth": [] } ], - "summary": "Remove member from asset", + "summary": "List advisories", "tags": [ - "Assets" + "Advisories" ] }, - "put": { + "post": { "parameters": [ { "description": "Organization slug", @@ -21915,9 +22046,9 @@ } }, { - "description": "User ID", + "description": "Asset version slug", "in": "path", - "name": "userID", + "name": "assetVersionSlug", "required": true, "schema": { "type": "string" @@ -21928,7 +22059,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.AssetChangeRoleRequest", + "$ref": "#/components/schemas/dtos.AdvisoryCreate", "summary": "body", "description": "Request body" } @@ -21953,14 +22084,14 @@ "BearerAuth": [] } ], - "summary": "Change role of asset member", + "summary": "Create advisory", "tags": [ - "Assets" + "Advisories" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/number-of-exploits/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -21988,20 +22119,28 @@ "schema": { "type": "string" } + }, + { + "description": "Asset version slug", + "in": "path", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Advisory ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.CVE" - }, - "type": "array" - } - } - }, "description": "OK" } }, @@ -22016,13 +22155,11 @@ "BearerAuth": [] } ], - "summary": "Get CVEs with known exploits for an asset", + "summary": "Delete advisory", "tags": [ - "Statistics" + "Advisories" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats": { + }, "get": { "parameters": [ { @@ -22051,6 +22188,24 @@ "schema": { "type": "string" } + }, + { + "description": "Asset version slug", + "in": "path", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Advisory ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -22058,10 +22213,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.PATDTO" - }, - "type": "array" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Advisory" } } }, @@ -22079,12 +22231,12 @@ "BearerAuth": [] } ], - "summary": "List asset access tokens", + "summary": "Get advisory details", "tags": [ - "Authentication" + "Advisories" ] }, - "post": { + "patch": { "parameters": [ { "description": "Organization slug", @@ -22112,13 +22264,31 @@ "schema": { "type": "string" } + }, + { + "description": "Asset version slug", + "in": "path", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Advisory ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.PatCreateRequest", + "$ref": "#/components/schemas/dtos.AdvisoryUpdate", "summary": "body", "description": "Request body" } @@ -22129,13 +22299,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.PATCreateResponseDTO" - } - } - }, "description": "OK" } }, @@ -22150,14 +22313,14 @@ "BearerAuth": [] } ], - "summary": "Create asset access token", + "summary": "Update advisory", "tags": [ - "Authentication" + "Advisories" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats/{tokenID}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/events/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -22187,15 +22350,37 @@ } }, { - "description": "Token ID", + "description": "Asset version slug", "in": "path", - "name": "tokenID", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Advisory ID", + "in": "path", + "name": "id", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.CreateEventRequest", + "summary": "event", + "description": "Event" + } + } + }, + "description": "Event", + "required": true + }, "responses": { "200": { "description": "OK" @@ -22212,14 +22397,14 @@ "BearerAuth": [] } ], - "summary": "Delete asset access token", + "summary": "Create advisory event", "tags": [ - "Authentication" + "Advisories" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pipeline-trigger/": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/affected-components/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -22247,56 +22432,20 @@ "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Trigger asset daemon pipeline", - "tags": [ - "Assets" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } }, { - "description": "Project slug", + "description": "Asset version slug", "in": "path", - "name": "projectSlug", + "name": "assetVersionSlug", "required": true, "schema": { "type": "string" } }, { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, + "description": "Artifact name", + "in": "query", + "name": "artifactName", "schema": { "type": "string" } @@ -22308,7 +22457,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/dtos.AssetVersionDTO" + "$ref": "#/components/schemas/dtos.DependencyVulnDTO" }, "type": "array" } @@ -22328,12 +22477,14 @@ "BearerAuth": [] } ], - "summary": "List asset versions", + "summary": "Get affected components and dependency vulnerabilities", "tags": [ "Asset Versions" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifact-root-nodes/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -22361,41 +22512,27 @@ "schema": { "type": "string" } + }, + { + "description": "Asset version slug", + "in": "path", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "defaultBranch": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "tag": { - "type": "boolean" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.AssetVersionDTO" + "type": "object" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -22409,14 +22546,14 @@ "BearerAuth": [] } ], - "summary": "Create asset version", + "summary": "Get information sources of the root nodes for each artifact", "tags": [ "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -22457,6 +22594,16 @@ ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/dtos.ArtifactDTO" + }, + "type": "array" + } + } + }, "description": "OK" } }, @@ -22471,12 +22618,12 @@ "BearerAuth": [] } ], - "summary": "Delete asset version", + "summary": "List artifacts of an asset version", "tags": [ "Asset Versions" ] }, - "get": { + "post": { "parameters": [ { "description": "Organization slug", @@ -22515,16 +22662,29 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.ArtifactRequest", + "summary": "body", + "description": "Artifact data" + } + } + }, + "description": "Artifact data", + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.AssetVersionDTO" + "$ref": "#/components/schemas/dtos.ArtifactDTO" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -22538,14 +22698,14 @@ "BearerAuth": [] } ], - "summary": "Get asset version details", + "summary": "Create artifact", "tags": [ - "Asset Versions" + "Artifacts" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -22582,17 +22742,19 @@ "schema": { "type": "string" } + }, + { + "description": "Artifact name", + "in": "path", + "name": "artifactName", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Advisory" - } - } - }, "description": "OK" } }, @@ -22607,12 +22769,12 @@ "BearerAuth": [] } ], - "summary": "List advisories", + "summary": "Delete artifact", "tags": [ - "Advisories" + "Artifacts" ] }, - "post": { + "put": { "parameters": [ { "description": "Organization slug", @@ -22649,23 +22811,39 @@ "schema": { "type": "string" } + }, + { + "description": "Artifact name", + "in": "path", + "name": "artifactName", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.AdvisoryCreate", + "$ref": "#/components/schemas/controllers.ArtifactRequest", "summary": "body", - "description": "Request body" + "description": "Artifact data" } } }, - "description": "Request body", + "description": "Artifact data", "required": true }, "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.ArtifactUpdateResponse" + } + } + }, "description": "OK" } }, @@ -22680,14 +22858,14 @@ "BearerAuth": [] } ], - "summary": "Create advisory", + "summary": "Update artifact", "tags": [ - "Advisories" + "Artifacts" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge}": { + "get": { "parameters": [ { "description": "Organization slug", @@ -22717,18 +22895,9 @@ } }, { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Advisory ID", + "description": "Badge type", "in": "path", - "name": "id", + "name": "badge", "required": true, "schema": { "type": "string" @@ -22737,25 +22906,43 @@ ], "responses": { "200": { - "description": "OK" + "content": { + "image/svg+xml": { + "schema": { + "type": "string" + } + } + }, + "description": "SVG badge" } }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Delete advisory", + "summary": "Get asset badge", "tags": [ - "Advisories" + "Assets" ] - }, + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json/": { + "get": { + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "CSAF advisory in JSON format" + } + }, + "summary": "Get an aggregated CSAF VEX for all of the artifact's vulnerabilities", + "tags": [ + "Artifacts" + ] + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json/": { "get": { "parameters": [ { @@ -22795,9 +22982,9 @@ } }, { - "description": "Advisory ID", + "description": "Artifact name", "in": "path", - "name": "id", + "name": "artifactName", "required": true, "schema": { "type": "string" @@ -22809,11 +22996,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Advisory" + "type": "object" } } }, - "description": "OK" + "description": "OpenVEX document in JSON format" } }, "security": [ @@ -22827,12 +23014,14 @@ "BearerAuth": [] } ], - "summary": "Get advisory details", + "summary": "Get VEX in OpenVEX JSON format", "tags": [ - "Advisories" + "Artifacts" ] - }, - "patch": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -22871,31 +23060,25 @@ } }, { - "description": "Advisory ID", + "description": "Artifact name", "in": "path", - "name": "id", + "name": "artifactName", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.AdvisoryUpdate", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { - "description": "OK" + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "CycloneDX BOM in JSON format" } }, "security": [ @@ -22909,14 +23092,14 @@ "BearerAuth": [] } ], - "summary": "Update advisory", + "summary": "Get SBOM in JSON format", "tags": [ - "Advisories" + "Artifacts" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/events/": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.pdf/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -22955,31 +23138,25 @@ } }, { - "description": "Advisory ID", + "description": "Artifact name", "in": "path", - "name": "id", + "name": "artifactName", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.CreateEventRequest", - "summary": "event", - "description": "Event" - } - } - }, - "description": "Event", - "required": true - }, "responses": { "200": { - "description": "OK" + "content": { + "application/pdf": { + "schema": { + "type": "string" + } + } + }, + "description": "SBOM as PDF" } }, "security": [ @@ -22993,13 +23170,13 @@ "BearerAuth": [] } ], - "summary": "Create advisory event", + "summary": "Get SBOM as PDF", "tags": [ - "Advisories" + "Artifacts" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/affected-components/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.xml/": { "get": { "parameters": [ { @@ -23040,8 +23217,9 @@ }, { "description": "Artifact name", - "in": "query", + "in": "path", "name": "artifactName", + "required": true, "schema": { "type": "string" } @@ -23050,16 +23228,13 @@ "responses": { "200": { "content": { - "application/json": { + "application/xml": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.DependencyVulnDTO" - }, - "type": "array" + "type": "string" } } }, - "description": "OK" + "description": "CycloneDX BOM in XML format" } }, "security": [ @@ -23073,14 +23248,14 @@ "BearerAuth": [] } ], - "summary": "Get affected components and dependency vulnerabilities", + "summary": "Get SBOM in XML format", "tags": [ - "Asset Versions" + "Artifacts" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifact-root-nodes/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sync-external-sources": { + "post": { "parameters": [ { "description": "Organization slug", @@ -23117,17 +23292,19 @@ "schema": { "type": "string" } + }, + { + "description": "Artifact name", + "in": "path", + "name": "artifactName", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, "description": "OK" } }, @@ -23142,13 +23319,13 @@ "BearerAuth": [] } ], - "summary": "Get information sources of the root nodes for each artifact", + "summary": "Sync external sources for a single artifact", "tags": [ - "Asset Versions" + "ExternalReferences" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json/": { "get": { "parameters": [ { @@ -23186,6 +23363,15 @@ "schema": { "type": "string" } + }, + { + "description": "Artifact name", + "in": "path", + "name": "artifactName", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -23193,14 +23379,11 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.ArtifactDTO" - }, - "type": "array" + "type": "object" } } }, - "description": "OK" + "description": "CycloneDX VEX in JSON format" } }, "security": [ @@ -23214,12 +23397,14 @@ "BearerAuth": [] } ], - "summary": "List artifacts of an asset version", + "summary": "Get VEX in JSON format", "tags": [ - "Asset Versions" + "Artifacts" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.xml/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -23256,31 +23441,27 @@ "schema": { "type": "string" } + }, + { + "description": "Artifact name", + "in": "path", + "name": "artifactName", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/controllers.ArtifactRequest", - "summary": "body", - "description": "Artifact data" - } - } - }, - "description": "Artifact data", - "required": true - }, "responses": { - "201": { + "200": { "content": { - "application/json": { + "application/xml": { "schema": { - "$ref": "#/components/schemas/dtos.ArtifactDTO" + "type": "string" } } }, - "description": "Created" + "description": "CycloneDX VEX in XML format" } }, "security": [ @@ -23294,14 +23475,14 @@ "BearerAuth": [] } ], - "summary": "Create artifact", + "summary": "Get VEX in XML format", "tags": [ "Artifacts" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vulnerability-report.pdf/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -23351,7 +23532,14 @@ ], "responses": { "200": { - "description": "OK" + "content": { + "application/pdf": { + "schema": { + "type": "string" + } + } + }, + "description": "Vulnerability report as PDF" } }, "security": [ @@ -23365,12 +23553,14 @@ "BearerAuth": [] } ], - "summary": "Delete artifact", + "summary": "Get vulnerability report as PDF", "tags": [ "Artifacts" ] - }, - "put": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/attestations": { + "get": { "parameters": [ { "description": "Organization slug", @@ -23407,36 +23597,17 @@ "schema": { "type": "string" } - }, - { - "description": "Artifact name", - "in": "path", - "name": "artifactName", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/controllers.ArtifactRequest", - "summary": "body", - "description": "Artifact data" - } - } - }, - "description": "Artifact data", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/controllers.ArtifactUpdateResponse" + "items": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Attestation" + }, + "type": "array" } } }, @@ -23454,13 +23625,13 @@ "BearerAuth": [] } ], - "summary": "Update artifact", + "summary": "List attestations", "tags": [ - "Artifacts" + "Attestations" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance": { "get": { "parameters": [ { @@ -23491,54 +23662,48 @@ } }, { - "description": "Badge type", + "description": "Asset version slug", "in": "path", - "name": "badge", + "name": "assetVersionSlug", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "content": { - "image/svg+xml": { - "schema": { - "type": "string" - } - } - }, - "description": "SVG badge" - } - }, - "summary": "Get asset badge", - "tags": [ - "Assets" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json/": { - "get": { "responses": { "200": { "content": { "application/json": { "schema": { - "type": "object" + "items": { + "$ref": "#/components/schemas/compliance.PolicyEvaluation" + }, + "type": "array" } } }, - "description": "CSAF advisory in JSON format" + "description": "OK" } }, - "summary": "Get an aggregated CSAF VEX for all of the artifact's vulnerabilities", + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + }, + { + "BearerAuth": [] + } + ], + "summary": "Get asset version compliance", "tags": [ - "Artifacts" + "Compliance" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures": { "get": { "parameters": [ { @@ -23576,15 +23741,6 @@ "schema": { "type": "string" } - }, - { - "description": "Artifact name", - "in": "path", - "name": "artifactName", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -23592,11 +23748,11 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO" } } }, - "description": "OpenVEX document in JSON format" + "description": "OK" } }, "security": [ @@ -23610,14 +23766,14 @@ "BearerAuth": [] } ], - "summary": "Get VEX in OpenVEX JSON format", + "summary": "List compliance postures paged", "tags": [ - "Artifacts" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/components/{statementID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -23656,9 +23812,9 @@ } }, { - "description": "Artifact name", + "description": "Statement ID", "in": "path", - "name": "artifactName", + "name": "statementID", "required": true, "schema": { "type": "string" @@ -23674,7 +23830,7 @@ } } }, - "description": "CycloneDX BOM in JSON format" + "description": "OK" } }, "security": [ @@ -23688,14 +23844,12 @@ "BearerAuth": [] } ], - "summary": "Get SBOM in JSON format", + "summary": "Delete a compliance statement", "tags": [ - "Artifacts" + "Compliance Components" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.pdf/": { - "get": { + }, + "put": { "parameters": [ { "description": "Organization slug", @@ -23734,25 +23888,38 @@ } }, { - "description": "Artifact name", + "description": "Statement ID", "in": "path", - "name": "artifactName", + "name": "statementID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.statementPayload", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { - "application/pdf": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" } } }, - "description": "SBOM as PDF" + "description": "OK" } }, "security": [ @@ -23766,13 +23933,13 @@ "BearerAuth": [] } ], - "summary": "Get SBOM as PDF", + "summary": "Update a compliance statement", "tags": [ - "Artifacts" + "Compliance Components" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.xml/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/oscal": { "get": { "parameters": [ { @@ -23810,27 +23977,18 @@ "schema": { "type": "string" } - }, - { - "description": "Artifact name", - "in": "path", - "name": "artifactName", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { "content": { - "application/xml": { + "application/json": { "schema": { - "type": "string" + "type": "object" } } }, - "description": "CycloneDX BOM in XML format" + "description": "OK" } }, "security": [ @@ -23844,14 +24002,14 @@ "BearerAuth": [] } ], - "summary": "Get SBOM in XML format", + "summary": "Get OSCAL system security plan", "tags": [ - "Artifacts" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sync-external-sources": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/stats": { + "get": { "parameters": [ { "description": "Organization slug", @@ -23888,19 +24046,17 @@ "schema": { "type": "string" } - }, - { - "description": "Artifact name", - "in": "path", - "name": "artifactName", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.CompliancePostureStatsDTO" + } + } + }, "description": "OK" } }, @@ -23915,13 +24071,13 @@ "BearerAuth": [] } ], - "summary": "Sync external sources for a single artifact", + "summary": "Get compliance posture stats", "tags": [ - "ExternalReferences" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID}": { "get": { "parameters": [ { @@ -23961,9 +24117,9 @@ } }, { - "description": "Artifact name", + "description": "Framework Control ID", "in": "path", - "name": "artifactName", + "name": "frameworkControlID", "required": true, "schema": { "type": "string" @@ -23975,11 +24131,11 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" } } }, - "description": "CycloneDX VEX in JSON format" + "description": "OK" } }, "security": [ @@ -23993,14 +24149,12 @@ "BearerAuth": [] } ], - "summary": "Get VEX in JSON format", + "summary": "Get compliance posture for a framework control", "tags": [ - "Artifacts" + "Compliance Postures" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.xml/": { - "get": { + }, + "post": { "parameters": [ { "description": "Organization slug", @@ -24039,25 +24193,45 @@ } }, { - "description": "Artifact name", + "description": "Framework Control ID", "in": "path", - "name": "artifactName", + "name": "frameworkControlID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "justification": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "title": "body", + "type": "object" + } + } + }, + "description": "Event data", + "required": true + }, "responses": { "200": { "content": { - "application/xml": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" } } }, - "description": "CycloneDX VEX in XML format" + "description": "OK" } }, "security": [ @@ -24071,14 +24245,14 @@ "BearerAuth": [] } ], - "summary": "Get VEX in XML format", + "summary": "Create a compliance posture event", "tags": [ - "Artifacts" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vulnerability-report.pdf/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}": { + "post": { "parameters": [ { "description": "Organization slug", @@ -24117,25 +24291,47 @@ } }, { - "description": "Artifact name", + "description": "Framework control ID", "in": "path", - "name": "artifactName", + "name": "frameworkControlID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Compliance component ID", + "in": "path", + "name": "complianceComponentID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.statementPayload", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { - "200": { + "201": { "content": { - "application/pdf": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" } } }, - "description": "Vulnerability report as PDF" + "description": "Created" } }, "security": [ @@ -24149,13 +24345,13 @@ "BearerAuth": [] } ], - "summary": "Get vulnerability report as PDF", + "summary": "Create a compliance statement for a component", "tags": [ - "Artifacts" + "Compliance Components" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/attestations": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance/{policy}": { "get": { "parameters": [ { @@ -24193,6 +24389,15 @@ "schema": { "type": "string" } + }, + { + "description": "Policy ID", + "in": "path", + "name": "policy", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -24200,10 +24405,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Attestation" - }, - "type": "array" + "$ref": "#/components/schemas/compliance.PolicyEvaluation" } } }, @@ -24221,13 +24423,13 @@ "BearerAuth": [] } ], - "summary": "List attestations", + "summary": "Get policy compliance details for an asset version", "tags": [ - "Attestations" + "Compliance" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components": { "get": { "parameters": [ { @@ -24272,10 +24474,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/compliance.PolicyEvaluation" - }, - "type": "array" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentDependencyDTO" } } }, @@ -24293,13 +24492,13 @@ "BearerAuth": [] } ], - "summary": "Get asset version compliance", + "summary": "List components paged", "tags": [ - "Compliance" + "Components" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses": { "get": { "parameters": [ { @@ -24337,6 +24536,14 @@ "schema": { "type": "string" } + }, + { + "description": "Artifact name", + "in": "query", + "name": "artifact", + "schema": { + "type": "string" + } } ], "responses": { @@ -24344,7 +24551,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO" + "items": { + "$ref": "#/components/schemas/controllers.licenseResponse" + }, + "type": "array" } } }, @@ -24362,14 +24572,14 @@ "BearerAuth": [] } ], - "summary": "List compliance postures paged", + "summary": "Get license distribution for an asset version", "tags": [ - "Compliance Postures" + "Components" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/components/{statementID}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses/refresh/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -24408,10 +24618,9 @@ } }, { - "description": "Statement ID", - "in": "path", - "name": "statementID", - "required": true, + "description": "Artifact name", + "in": "query", + "name": "artifactName", "schema": { "type": "string" } @@ -24440,12 +24649,14 @@ "BearerAuth": [] } ], - "summary": "Delete a compliance statement", + "summary": "Refetch license information for all components", "tags": [ - "Compliance Components" + "Asset Versions" ] - }, - "put": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-graph/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -24484,34 +24695,28 @@ } }, { - "description": "Statement ID", - "in": "path", - "name": "statementID", - "required": true, + "description": "Artifact name", + "in": "query", + "name": "artifactName", + "schema": { + "type": "string" + } + }, + { + "description": "Info source origin", + "in": "query", + "name": "origin", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/controllers.statementPayload", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" + "$ref": "#/components/schemas/transformer.MinimalTree" } } }, @@ -24529,13 +24734,13 @@ "BearerAuth": [] } ], - "summary": "Update a compliance statement", + "summary": "Get minimal dependency graph tree", "tags": [ - "Compliance Components" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/oscal": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns": { "get": { "parameters": [ { @@ -24573,6 +24778,22 @@ "schema": { "type": "string" } + }, + { + "description": "Flat list flag", + "in": "query", + "name": "flat", + "schema": { + "type": "string" + } + }, + { + "description": "Search term", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } } ], "responses": { @@ -24598,14 +24819,14 @@ "BearerAuth": [] } ], - "summary": "Get OSCAL system security plan", + "summary": "List dependency vulnerabilities", "tags": [ - "Compliance Postures" + "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/stats": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/batch": { + "post": { "parameters": [ { "description": "Organization slug", @@ -24644,12 +24865,28 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.BatchDependencyVulnStatus", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureStatsDTO" + "items": { + "$ref": "#/components/schemas/dtos.DetailedDependencyVulnDTO" + }, + "type": "array" } } }, @@ -24667,14 +24904,14 @@ "BearerAuth": [] } ], - "summary": "Get compliance posture stats", + "summary": "Batch create vulnerability events", "tags": [ - "Compliance Postures" + "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID}": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/sync": { + "post": { "parameters": [ { "description": "Organization slug", @@ -24711,23 +24948,26 @@ "schema": { "type": "string" } - }, - { - "description": "Framework Control ID", - "in": "path", - "name": "frameworkControlID", - "required": true, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "title": "body", + "type": "object" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" + "type": "object" } } }, @@ -24745,12 +24985,14 @@ "BearerAuth": [] } ], - "summary": "Get compliance posture for a framework control", + "summary": "Sync dependency vulnerabilities with third party integrations", "tags": [ - "Compliance Postures" + "Vulnerabilities" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}": { + "get": { "parameters": [ { "description": "Organization slug", @@ -24789,41 +25031,21 @@ } }, { - "description": "Framework Control ID", + "description": "Vulnerability ID", "in": "path", - "name": "frameworkControlID", + "name": "dependencyVulnID", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "justification": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Event data", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" + "$ref": "#/components/schemas/dtos.DetailedDependencyVulnWithRelationsDTO" } } }, @@ -24841,13 +25063,11 @@ "BearerAuth": [] } ], - "summary": "Create a compliance posture event", + "summary": "Get dependency vulnerability details", "tags": [ - "Compliance Postures" + "Vulnerabilities" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}": { + }, "post": { "parameters": [ { @@ -24887,18 +25107,9 @@ } }, { - "description": "Framework control ID", - "in": "path", - "name": "frameworkControlID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Compliance component ID", + "description": "Vulnerability ID", "in": "path", - "name": "complianceComponentID", + "name": "dependencyVulnID", "required": true, "schema": { "type": "string" @@ -24909,7 +25120,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/controllers.statementPayload", + "$ref": "#/components/schemas/dtos.CreateEventRequest", "summary": "body", "description": "Request body" } @@ -24919,15 +25130,15 @@ "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" + "$ref": "#/components/schemas/dtos.DetailedDependencyVulnDTO" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -24941,13 +25152,13 @@ "BearerAuth": [] } ], - "summary": "Create a compliance statement for a component", + "summary": "Create vulnerability event", "tags": [ - "Compliance Components" + "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance/{policy}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/events": { "get": { "parameters": [ { @@ -24987,9 +25198,9 @@ } }, { - "description": "Policy ID", + "description": "Dependency vulnerability ID", "in": "path", - "name": "policy", + "name": "dependencyVulnID", "required": true, "schema": { "type": "string" @@ -25001,7 +25212,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/compliance.PolicyEvaluation" + "items": { + "$ref": "#/components/schemas/dtos.VulnEventDTO" + }, + "type": "array" } } }, @@ -25019,13 +25233,13 @@ "BearerAuth": [] } ], - "summary": "Get policy compliance details for an asset version", + "summary": "List events for a vulnerability", "tags": [ - "Compliance" + "Vulnerability Events" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/hints": { "get": { "parameters": [ { @@ -25063,6 +25277,15 @@ "schema": { "type": "string" } + }, + { + "description": "Vulnerability ID", + "in": "path", + "name": "dependencyVulnID", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -25070,7 +25293,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentDependencyDTO" + "type": "object" } } }, @@ -25088,14 +25311,14 @@ "BearerAuth": [] } ], - "summary": "List components paged", + "summary": "Get hints for a dependency vulnerability", "tags": [ - "Components" + "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/mitigate": { + "post": { "parameters": [ { "description": "Organization slug", @@ -25134,23 +25357,38 @@ } }, { - "description": "Artifact name", - "in": "query", - "name": "artifact", + "description": "Vulnerability ID", + "in": "path", + "name": "dependencyVulnID", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "comment": { + "type": "string" + } + }, + "title": "body", + "type": "object" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/controllers.licenseResponse" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.DetailedDependencyVulnDTO" } } }, @@ -25168,14 +25406,14 @@ "BearerAuth": [] } ], - "summary": "Get license distribution for an asset version", + "summary": "Mitigate a dependency vulnerability", "tags": [ - "Components" + "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses/refresh/": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events": { + "get": { "parameters": [ { "description": "Organization slug", @@ -25214,11 +25452,19 @@ } }, { - "description": "Artifact name", + "description": "Page number", "in": "query", - "name": "artifactName", + "name": "page", "schema": { - "type": "string" + "type": "integer" + } + }, + { + "description": "Page size", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" } } ], @@ -25227,7 +25473,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_VulnEventDTO" } } }, @@ -25245,14 +25491,14 @@ "BearerAuth": [] } ], - "summary": "Refetch license information for all components", + "summary": "List events for an asset version", "tags": [ - "Asset Versions" + "Vulnerability Events" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-graph/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events/{eventID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -25291,32 +25537,18 @@ } }, { - "description": "Artifact name", - "in": "query", - "name": "artifactName", - "schema": { - "type": "string" - } - }, - { - "description": "Info source origin", - "in": "query", - "name": "origin", + "description": "Event ID", + "in": "path", + "name": "eventID", + "required": true, "schema": { "type": "string" } } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/transformer.MinimalTree" - } - } - }, - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -25330,13 +25562,13 @@ "BearerAuth": [] } ], - "summary": "Get minimal dependency graph tree", + "summary": "Delete an event", "tags": [ - "Asset Versions" + "Vulnerability Events" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns": { "get": { "parameters": [ { @@ -25375,14 +25607,6 @@ "type": "string" } }, - { - "description": "Flat list flag", - "in": "query", - "name": "flat", - "schema": { - "type": "string" - } - }, { "description": "Search term", "in": "query", @@ -25415,13 +25639,13 @@ "BearerAuth": [] } ], - "summary": "List dependency vulnerabilities", + "summary": "List first-party vulnerabilities by asset version", "tags": [ "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/batch": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/batch": { "post": { "parameters": [ { @@ -25465,7 +25689,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.BatchDependencyVulnStatus", + "$ref": "#/components/schemas/dtos.BatchFirstPartyVulnStatus", "summary": "body", "description": "Request body" } @@ -25480,7 +25704,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/dtos.DetailedDependencyVulnDTO" + "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" }, "type": "array" } @@ -25500,94 +25724,13 @@ "BearerAuth": [] } ], - "summary": "Batch create vulnerability events", - "tags": [ - "Vulnerabilities" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/sync": { - "post": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "title": "body", - "type": "object" - } - } - }, - "description": "Request body", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Sync dependency vulnerabilities with third party integrations", + "summary": "Batch update first-party vulnerability states", "tags": [ "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}": { "get": { "parameters": [ { @@ -25629,7 +25772,7 @@ { "description": "Vulnerability ID", "in": "path", - "name": "dependencyVulnID", + "name": "firstPartyVulnID", "required": true, "schema": { "type": "string" @@ -25641,7 +25784,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedDependencyVulnWithRelationsDTO" + "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" } } }, @@ -25659,7 +25802,7 @@ "BearerAuth": [] } ], - "summary": "Get dependency vulnerability details", + "summary": "Get first-party vulnerability details", "tags": [ "Vulnerabilities" ] @@ -25705,7 +25848,7 @@ { "description": "Vulnerability ID", "in": "path", - "name": "dependencyVulnID", + "name": "firstPartyVulnID", "required": true, "schema": { "type": "string" @@ -25716,13 +25859,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CreateEventRequest", + "$ref": "#/components/schemas/dtos.FirstPartyVulnStatus", "summary": "body", - "description": "Request body" + "description": "Event data" } } }, - "description": "Request body", + "description": "Event data", "required": true }, "responses": { @@ -25730,7 +25873,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedDependencyVulnDTO" + "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" } } }, @@ -25748,13 +25891,13 @@ "BearerAuth": [] } ], - "summary": "Create vulnerability event", + "summary": "Create first-party vulnerability event", "tags": [ "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/events": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/events": { "get": { "parameters": [ { @@ -25835,8 +25978,8 @@ ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/hints": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/mitigate": { + "post": { "parameters": [ { "description": "Organization slug", @@ -25877,19 +26020,36 @@ { "description": "Vulnerability ID", "in": "path", - "name": "dependencyVulnID", + "name": "firstPartyVulnID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "justification": { + "type": "string" + } + }, + "title": "body", + "type": "object" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" } } }, @@ -25907,14 +26067,14 @@ "BearerAuth": [] } ], - "summary": "Get hints for a dependency vulnerability", + "summary": "Mitigate a first-party vulnerability", "tags": [ "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/mitigate": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/in-toto/{supplyChainID}/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -25953,38 +26113,21 @@ } }, { - "description": "Vulnerability ID", + "description": "Supply chain ID", "in": "path", - "name": "dependencyVulnID", + "name": "supplyChainID", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "comment": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedDependencyVulnDTO" + "type": "file" } } }, @@ -26002,13 +26145,13 @@ "BearerAuth": [] } ], - "summary": "Mitigate a dependency vulnerability", + "summary": "Download in-toto links for a supply chain", "tags": [ - "Vulnerabilities" + "In-toto" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks": { "get": { "parameters": [ { @@ -26046,22 +26189,6 @@ "schema": { "type": "string" } - }, - { - "description": "Page number", - "in": "query", - "name": "page", - "schema": { - "type": "integer" - } - }, - { - "description": "Page size", - "in": "query", - "name": "pageSize", - "schema": { - "type": "integer" - } } ], "responses": { @@ -26069,7 +26196,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_VulnEventDTO" + "type": "object" } } }, @@ -26087,14 +26214,12 @@ "BearerAuth": [] } ], - "summary": "List events for an asset version", + "summary": "List license risks", "tags": [ - "Vulnerability Events" + "License Risk" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events/{eventID}": { - "delete": { + }, + "post": { "parameters": [ { "description": "Organization slug", @@ -26131,20 +26256,38 @@ "schema": { "type": "string" } - }, - { - "description": "Event ID", - "in": "path", - "name": "eventID", - "required": true, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "componentPurl": { + "type": "string" + }, + "finalLicenseDecision": { + "type": "string" + } + }, + "title": "body", + "type": "object" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.LicenseRisk" + } + } + }, + "description": "OK" } }, "security": [ @@ -26158,13 +26301,13 @@ "BearerAuth": [] } ], - "summary": "Delete an event", + "summary": "Create license risk", "tags": [ - "Vulnerability Events" + "License Risk" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}": { "get": { "parameters": [ { @@ -26204,9 +26347,10 @@ } }, { - "description": "Search term", - "in": "query", - "name": "search", + "description": "License risk ID", + "in": "path", + "name": "licenseRiskID", + "required": true, "schema": { "type": "string" } @@ -26217,7 +26361,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" } } }, @@ -26235,13 +26379,11 @@ "BearerAuth": [] } ], - "summary": "List first-party vulnerabilities by asset version", + "summary": "Get license risk details", "tags": [ - "Vulnerabilities" + "License Risk" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/batch": { + }, "post": { "parameters": [ { @@ -26279,13 +26421,22 @@ "schema": { "type": "string" } + }, + { + "description": "License risk ID", + "in": "path", + "name": "licenseRiskID", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.BatchFirstPartyVulnStatus", + "$ref": "#/components/schemas/controllers.LicenseRiskStatus", "summary": "body", "description": "Request body" } @@ -26299,10 +26450,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" } } }, @@ -26320,14 +26468,14 @@ "BearerAuth": [] } ], - "summary": "Batch update first-party vulnerability states", + "summary": "Create a license risk event", "tags": [ - "Vulnerabilities" + "License Risk" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/final-license-decision": { + "post": { "parameters": [ { "description": "Organization slug", @@ -26366,21 +26514,34 @@ } }, { - "description": "Vulnerability ID", + "description": "License risk ID", "in": "path", - "name": "firstPartyVulnID", + "name": "licenseRiskID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.MakeFinalLicenseDecisionRequest", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" + "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" } } }, @@ -26398,11 +26559,13 @@ "BearerAuth": [] } ], - "summary": "Get first-party vulnerability details", + "summary": "Make final license decision", "tags": [ - "Vulnerabilities" + "License Risk" ] - }, + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/mitigate": { "post": { "parameters": [ { @@ -26442,9 +26605,9 @@ } }, { - "description": "Vulnerability ID", + "description": "License risk ID", "in": "path", - "name": "firstPartyVulnID", + "name": "licenseRiskID", "required": true, "schema": { "type": "string" @@ -26455,13 +26618,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.FirstPartyVulnStatus", - "summary": "body", - "description": "Event data" + "properties": { + "comment": { + "type": "string" + } + }, + "title": "body", + "type": "object" } } }, - "description": "Event data", + "description": "Request body", "required": true }, "responses": { @@ -26469,7 +26636,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" + "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" } } }, @@ -26487,14 +26654,14 @@ "BearerAuth": [] } ], - "summary": "Create first-party vulnerability event", + "summary": "Mitigate a license risk", "tags": [ - "Vulnerabilities" + "License Risk" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/events": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/make-default/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -26531,15 +26698,6 @@ "schema": { "type": "string" } - }, - { - "description": "Dependency vulnerability ID", - "in": "path", - "name": "dependencyVulnID", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -26547,10 +26705,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.VulnEventDTO" - }, - "type": "array" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.AssetVersion" } } }, @@ -26568,14 +26723,14 @@ "BearerAuth": [] } ], - "summary": "List events for a vulnerability", + "summary": "Mark asset version as the default branch", "tags": [ - "Vulnerability Events" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/mitigate": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/metrics": { + "get": { "parameters": [ { "description": "Organization slug", @@ -26614,38 +26769,20 @@ } }, { - "description": "Vulnerability ID", - "in": "path", - "name": "firstPartyVulnID", - "required": true, + "description": "Artifact name", + "in": "query", + "name": "artifactName", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "justification": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedFirstPartyVulnDTO" + "type": "object" } } }, @@ -26663,13 +26800,13 @@ "BearerAuth": [] } ], - "summary": "Mitigate a first-party vulnerability", + "summary": "Get asset version metrics", "tags": [ - "Vulnerabilities" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/in-toto/{supplyChainID}/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/path-to-component/": { "get": { "parameters": [ { @@ -26709,10 +26846,17 @@ } }, { - "description": "Supply chain ID", - "in": "path", - "name": "supplyChainID", - "required": true, + "description": "Component pURL", + "in": "query", + "name": "purl", + "schema": { + "type": "string" + } + }, + { + "description": "Artifact name", + "in": "query", + "name": "artifactName", "schema": { "type": "string" } @@ -26723,7 +26867,13 @@ "content": { "application/json": { "schema": { - "type": "file" + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "array" } } }, @@ -26741,13 +26891,13 @@ "BearerAuth": [] } ], - "summary": "Download in-toto links for a supply chain", + "summary": "Get dependency paths leading to a component pURL", "tags": [ - "In-toto" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sarif.json": { "get": { "parameters": [ { @@ -26810,12 +26960,14 @@ "BearerAuth": [] } ], - "summary": "List license risks", + "summary": "Get first-party vulnerabilities as SARIF", "tags": [ - "License Risk" + "Vulnerabilities" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sbom.json/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -26854,32 +27006,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "componentPurl": { - "type": "string" - }, - "finalLicenseDecision": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.LicenseRisk" + "type": "object" } } }, @@ -26897,13 +27029,13 @@ "BearerAuth": [] } ], - "summary": "Create license risk", + "summary": "Get SBOM as CycloneDX JSON", "tags": [ - "License Risk" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/average-fixing-time/": { "get": { "parameters": [ { @@ -26943,10 +27075,9 @@ } }, { - "description": "License risk ID", - "in": "path", - "name": "licenseRiskID", - "required": true, + "description": "Restrict results to a specific artifact", + "in": "query", + "name": "artifactName", "schema": { "type": "string" } @@ -26957,7 +27088,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" + "$ref": "#/components/schemas/dtos.RemediationTimeAverages" } } }, @@ -26975,12 +27106,14 @@ "BearerAuth": [] } ], - "summary": "Get license risk details", + "summary": "Get average fixing times for an asset version", "tags": [ - "License Risk" + "Statistics" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/component-risk/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -27019,34 +27152,20 @@ } }, { - "description": "License risk ID", - "in": "path", - "name": "licenseRiskID", - "required": true, + "description": "Restrict results to a specific artifact", + "in": "query", + "name": "artifactName", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/controllers.LicenseRiskStatus", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" + "type": "object" } } }, @@ -27064,14 +27183,14 @@ "BearerAuth": [] } ], - "summary": "Create a license risk event", + "summary": "Get component risk distribution for an asset version", "tags": [ - "License Risk" + "Statistics" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/final-license-decision": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/risk-history/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -27110,34 +27229,41 @@ } }, { - "description": "License risk ID", - "in": "path", - "name": "licenseRiskID", + "description": "Restrict results to a specific artifact", + "in": "query", + "name": "artifactName", + "schema": { + "type": "string" + } + }, + { + "description": "Start date (YYYY-MM-DD)", + "in": "query", + "name": "start", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "End date (YYYY-MM-DD)", + "in": "query", + "name": "end", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.MakeFinalLicenseDecisionRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" + "items": { + "$ref": "#/components/schemas/dtos.RiskHistoryDTO" + }, + "type": "array" } } }, @@ -27155,14 +27281,14 @@ "BearerAuth": [] } ], - "summary": "Make final license decision", + "summary": "Get risk history for an asset version", "tags": [ - "License Risk" + "Statistics" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/mitigate": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/vex.json/": { + "get": { "parameters": [ { "description": "Organization slug", @@ -27199,40 +27325,14 @@ "schema": { "type": "string" } - }, - { - "description": "License risk ID", - "in": "path", - "name": "licenseRiskID", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "comment": { - "type": "string" - } - }, - "title": "body", - "type": "object" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.DetailedLicenseRiskDTO" + "type": "object" } } }, @@ -27250,15 +27350,23 @@ "BearerAuth": [] } ], - "summary": "Mitigate a license risk", + "summary": "Get VEX as CycloneDX JSON", "tags": [ - "License Risk" + "Asset Versions" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/make-default/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/sbom-file": { "post": { "parameters": [ + { + "description": "Origin", + "in": "header", + "name": "X-Origin", + "schema": { + "type": "string" + } + }, { "description": "Organization slug", "in": "path", @@ -27285,47 +27393,59 @@ "schema": { "type": "string" } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.AssetVersion" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "description": "SBOM file", + "format": "binary", + "type": "string" + } + }, + "required": [ + "file" + ], + "type": "object" + } + } + }, + "description": "SBOM file", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.ScanResponse" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + }, { "BearerAuth": [] } ], - "summary": "Mark asset version as the default branch", + "summary": "Scan SBOM file", "tags": [ - "Asset Versions" + "Scanning" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/metrics": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/secrets/": { "get": { "parameters": [ { @@ -27354,23 +27474,6 @@ "schema": { "type": "string" } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Artifact name", - "in": "query", - "name": "artifactName", - "schema": { - "type": "string" - } } ], "responses": { @@ -27378,6 +27481,9 @@ "content": { "application/json": { "schema": { + "additionalProperties": { + "type": "string" + }, "type": "object" } } @@ -27396,14 +27502,14 @@ "BearerAuth": [] } ], - "summary": "Get asset version metrics", + "summary": "Get asset secrets", "tags": [ - "Asset Versions" + "Assets" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/path-to-component/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/signing-key/": { + "post": { "parameters": [ { "description": "Organization slug", @@ -27431,48 +27537,22 @@ "schema": { "type": "string" } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Component pURL", - "in": "query", - "name": "purl", - "schema": { - "type": "string" - } - }, - { - "description": "Artifact name", - "in": "query", - "name": "artifactName", - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "title": "body", + "type": "object" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": "array" - } - } - }, "description": "OK" } }, @@ -27487,13 +27567,13 @@ "BearerAuth": [] } ], - "summary": "Get dependency paths leading to a component pURL", + "summary": "Attach signing key to asset", "tags": [ - "Asset Versions" + "Assets" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sarif.json": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/stats/risk-history/": { "get": { "parameters": [ { @@ -27524,9 +27604,26 @@ } }, { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", + "description": "Restrict results to a specific artifact", + "in": "query", + "name": "artifactName", + "schema": { + "type": "string" + } + }, + { + "description": "Start date (YYYY-MM-DD)", + "in": "query", + "name": "start", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "End date (YYYY-MM-DD)", + "in": "query", + "name": "end", "required": true, "schema": { "type": "string" @@ -27538,7 +27635,10 @@ "content": { "application/json": { "schema": { - "type": "object" + "items": { + "$ref": "#/components/schemas/dtos.RiskHistoryWithVersionDTO" + }, + "type": "array" } } }, @@ -27556,13 +27656,13 @@ "BearerAuth": [] } ], - "summary": "Get first-party vulnerabilities as SARIF", + "summary": "Get risk history for an asset across all asset versions", "tags": [ - "Vulnerabilities" + "Statistics" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sbom.json/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules": { "get": { "parameters": [ { @@ -27593,10 +27693,25 @@ } }, { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, + "description": "Page number (default: 1)", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "Page size (default: 10, max: 100)", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" + } + }, + { + "description": "Search term for CVE ID or justification", + "in": "query", + "name": "search", "schema": { "type": "string" } @@ -27607,6 +27722,23 @@ "content": { "application/json": { "schema": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/dtos.VEXRuleDTO" + }, + "type": "array" + }, + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, "type": "object" } } @@ -27625,14 +27757,12 @@ "BearerAuth": [] } ], - "summary": "Get SBOM as CycloneDX JSON", + "summary": "List VEX rules for an asset", "tags": [ - "Asset Versions" + "VEXRules" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/average-fixing-time/": { - "get": { + }, + "post": { "parameters": [ { "description": "Organization slug", @@ -27660,35 +27790,31 @@ "schema": { "type": "string" } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Restrict results to a specific artifact", - "in": "query", - "name": "artifactName", - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.CreateVEXRuleRequest", + "summary": "body", + "description": "Rule data" + } + } + }, + "description": "Rule data", + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.RemediationTimeAverages" + "$ref": "#/components/schemas/dtos.VEXRuleDTO" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -27702,13 +27828,13 @@ "BearerAuth": [] } ], - "summary": "Get average fixing times for an asset version", + "summary": "Create a VEX rule", "tags": [ - "Statistics" + "VEXRules" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/component-risk/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations": { "get": { "parameters": [ { @@ -27737,23 +27863,6 @@ "schema": { "type": "string" } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Restrict results to a specific artifact", - "in": "query", - "name": "artifactName", - "schema": { - "type": "string" - } } ], "responses": { @@ -27761,6 +27870,9 @@ "content": { "application/json": { "schema": { + "additionalProperties": { + "$ref": "#/components/schemas/dtos.VexRuleRecommendation" + }, "type": "object" } } @@ -27779,13 +27891,13 @@ "BearerAuth": [] } ], - "summary": "Get component risk distribution for an asset version", + "summary": "Get crowdsourced VEX recommendations for all vulns of an asset", "tags": [ - "Statistics" + "CrowdsourcedVexing" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/risk-history/": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations/{dependencyVulnID}": { "get": { "parameters": [ { @@ -27816,50 +27928,103 @@ } }, { - "description": "Asset version slug", + "description": "Dependency vuln ID", "in": "path", - "name": "assetVersionSlug", + "name": "dependencyVulnID", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.VexRuleRecommendation" + } + } + }, + "description": "OK" + }, + "204": { + "description": "No recommendation available" + }, + "404": { + "description": "Dependency vulnerability not found" + } + }, + "security": [ + { + "CookieAuth": [] }, { - "description": "Restrict results to a specific artifact", - "in": "query", - "name": "artifactName", + "PATAuth": [] + }, + { + "BearerAuth": [] + } + ], + "summary": "Get a crowdsourced VEX recommendation for a dependency vuln", + "tags": [ + "CrowdsourcedVexing" + ] + } + }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/test": { + "post": { + "parameters": [ + { + "description": "Organization slug", + "in": "path", + "name": "organization", + "required": true, "schema": { "type": "string" } }, { - "description": "Start date (YYYY-MM-DD)", - "in": "query", - "name": "start", + "description": "Project slug", + "in": "path", + "name": "projectSlug", "required": true, "schema": { "type": "string" } }, { - "description": "End date (YYYY-MM-DD)", - "in": "query", - "name": "end", + "description": "Asset slug", + "in": "path", + "name": "assetSlug", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.TestVEXRulesRequest", + "summary": "body", + "description": "CEL expressions to test" + } + } + }, + "description": "CEL expressions to test", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.RiskHistoryDTO" + "additionalProperties": { + "type": "integer" }, - "type": "array" + "type": "object" } } }, @@ -27877,14 +28042,14 @@ "BearerAuth": [] } ], - "summary": "Get risk history for an asset version", + "summary": "Test VEX rules against the vulnerabilities they'd apply to", "tags": [ - "Statistics" + "VEXRules" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/vex.json/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/{ruleId}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -27914,9 +28079,9 @@ } }, { - "description": "Asset version slug", + "description": "Rule ID", "in": "path", - "name": "assetVersionSlug", + "name": "ruleId", "required": true, "schema": { "type": "string" @@ -27924,15 +28089,8 @@ } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -27946,23 +28104,13 @@ "BearerAuth": [] } ], - "summary": "Get VEX as CycloneDX JSON", + "summary": "Delete a VEX rule", "tags": [ - "Asset Versions" + "VEXRules" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/sbom-file": { - "post": { + }, + "get": { "parameters": [ - { - "description": "Origin", - "in": "header", - "name": "X-Origin", - "schema": { - "type": "string" - } - }, { "description": "Organization slug", "in": "path", @@ -27989,35 +28137,23 @@ "schema": { "type": "string" } + }, + { + "description": "Rule ID", + "in": "path", + "name": "ruleId", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "file": { - "description": "SBOM file", - "format": "binary", - "type": "string" - } - }, - "required": [ - "file" - ], - "type": "object" - } - } - }, - "description": "SBOM file", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ScanResponse" + "$ref": "#/components/schemas/dtos.VEXRuleDTO" } } }, @@ -28035,13 +28171,13 @@ "BearerAuth": [] } ], - "summary": "Scan SBOM file", + "summary": "Get a VEX rule", "tags": [ - "Scanning" + "VEXRules" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/secrets/": { + "/organizations/{organization}/projects/{projectSlug}/compliance": { "get": { "parameters": [ { @@ -28061,15 +28197,6 @@ "schema": { "type": "string" } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -28077,10 +28204,10 @@ "content": { "application/json": { "schema": { - "additionalProperties": { - "type": "string" + "items": { + "type": "array" }, - "type": "object" + "type": "array" } } }, @@ -28098,14 +28225,14 @@ "BearerAuth": [] } ], - "summary": "Get asset secrets", + "summary": "Get project compliance", "tags": [ - "Assets" + "Compliance" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/signing-key/": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/compliance-postures": { + "get": { "parameters": [ { "description": "Organization slug", @@ -28124,31 +28251,17 @@ "schema": { "type": "string" } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "title": "body", - "type": "object" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO" + } + } + }, "description": "OK" } }, @@ -28163,14 +28276,14 @@ "BearerAuth": [] } ], - "summary": "Attach signing key to asset", + "summary": "List compliance postures paged", "tags": [ - "Assets" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/stats/risk-history/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/compliance-postures/components/{statementID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -28191,35 +28304,9 @@ } }, { - "description": "Asset slug", + "description": "Statement ID", "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Restrict results to a specific artifact", - "in": "query", - "name": "artifactName", - "schema": { - "type": "string" - } - }, - { - "description": "Start date (YYYY-MM-DD)", - "in": "query", - "name": "start", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "End date (YYYY-MM-DD)", - "in": "query", - "name": "end", + "name": "statementID", "required": true, "schema": { "type": "string" @@ -28231,10 +28318,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.RiskHistoryWithVersionDTO" - }, - "type": "array" + "type": "object" } } }, @@ -28252,14 +28336,12 @@ "BearerAuth": [] } ], - "summary": "Get risk history for an asset across all asset versions", + "summary": "Delete a compliance statement", "tags": [ - "Statistics" + "Compliance Components" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules": { - "get": { + }, + "put": { "parameters": [ { "description": "Organization slug", @@ -28280,62 +28362,34 @@ } }, { - "description": "Asset slug", + "description": "Statement ID", "in": "path", - "name": "assetSlug", + "name": "statementID", "required": true, "schema": { "type": "string" } - }, - { - "description": "Page number (default: 1)", - "in": "query", - "name": "page", - "schema": { - "type": "integer" - } - }, - { - "description": "Page size (default: 10, max: 100)", - "in": "query", - "name": "pageSize", - "schema": { - "type": "integer" - } - }, - { - "description": "Search term for CVE ID or justification", - "in": "query", - "name": "search", - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.statementPayload", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/dtos.VEXRuleDTO" - }, - "type": "array" - }, - "page": { - "type": "integer" - }, - "pageSize": { - "type": "integer" - }, - "total": { - "type": "integer" - } - }, - "type": "object" + "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" } } }, @@ -28353,12 +28407,14 @@ "BearerAuth": [] } ], - "summary": "List VEX rules for an asset", + "summary": "Update a compliance statement", "tags": [ - "VEXRules" + "Compliance Components" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/compliance-postures/oscal": { + "get": { "parameters": [ { "description": "Organization slug", @@ -28377,40 +28433,18 @@ "schema": { "type": "string" } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.CreateVEXRuleRequest", - "summary": "body", - "description": "Rule data" - } - } - }, - "description": "Rule data", - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.VEXRuleDTO" + "type": "object" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -28424,13 +28458,13 @@ "BearerAuth": [] } ], - "summary": "Create a VEX rule", + "summary": "Get OSCAL system security plan", "tags": [ - "VEXRules" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations": { + "/organizations/{organization}/projects/{projectSlug}/compliance-postures/stats": { "get": { "parameters": [ { @@ -28450,15 +28484,6 @@ "schema": { "type": "string" } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -28466,10 +28491,7 @@ "content": { "application/json": { "schema": { - "additionalProperties": { - "$ref": "#/components/schemas/dtos.VexRuleRecommendation" - }, - "type": "object" + "$ref": "#/components/schemas/dtos.CompliancePostureStatsDTO" } } }, @@ -28487,13 +28509,13 @@ "BearerAuth": [] } ], - "summary": "Get crowdsourced VEX recommendations for all vulns of an asset", + "summary": "Get compliance posture stats", "tags": [ - "CrowdsourcedVexing" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations/{dependencyVulnID}": { + "/organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}": { "get": { "parameters": [ { @@ -28515,18 +28537,9 @@ } }, { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Dependency vuln ID", + "description": "Framework Control ID", "in": "path", - "name": "dependencyVulnID", + "name": "frameworkControlID", "required": true, "schema": { "type": "string" @@ -28538,17 +28551,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.VexRuleRecommendation" + "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" } } }, "description": "OK" - }, - "204": { - "description": "No recommendation available" - }, - "404": { - "description": "Dependency vulnerability not found" } }, "security": [ @@ -28562,13 +28569,11 @@ "BearerAuth": [] } ], - "summary": "Get a crowdsourced VEX recommendation for a dependency vuln", + "summary": "Get compliance posture for a framework control", "tags": [ - "CrowdsourcedVexing" + "Compliance Postures" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/test": { + }, "post": { "parameters": [ { @@ -28590,9 +28595,9 @@ } }, { - "description": "Asset slug", + "description": "Framework Control ID", "in": "path", - "name": "assetSlug", + "name": "frameworkControlID", "required": true, "schema": { "type": "string" @@ -28603,13 +28608,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.TestVEXRulesRequest", - "summary": "body", - "description": "CEL expressions to test" + "properties": { + "justification": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "title": "body", + "type": "object" } } }, - "description": "CEL expressions to test", + "description": "Event data", "required": true }, "responses": { @@ -28617,10 +28629,7 @@ "content": { "application/json": { "schema": { - "additionalProperties": { - "type": "integer" - }, - "type": "object" + "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" } } }, @@ -28638,14 +28647,14 @@ "BearerAuth": [] } ], - "summary": "Test VEX rules against the vulnerabilities they'd apply to", + "summary": "Create a compliance posture event", "tags": [ - "VEXRules" + "Compliance Postures" ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/{ruleId}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}": { + "post": { "parameters": [ { "description": "Organization slug", @@ -28666,27 +28675,47 @@ } }, { - "description": "Asset slug", + "description": "Framework control ID", "in": "path", - "name": "assetSlug", + "name": "frameworkControlID", "required": true, "schema": { "type": "string" } }, { - "description": "Rule ID", + "description": "Compliance component ID", "in": "path", - "name": "ruleId", + "name": "complianceComponentID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/controllers.statementPayload", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { - "204": { - "description": "No Content" + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" + } + } + }, + "description": "Created" } }, "security": [ @@ -28700,80 +28729,13 @@ "BearerAuth": [] } ], - "summary": "Delete a VEX rule", + "summary": "Create a compliance statement for a component", "tags": [ - "VEXRules" - ] - }, - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Rule ID", - "in": "path", - "name": "ruleId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.VEXRuleDTO" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get a VEX rule", - "tags": [ - "VEXRules" + "Compliance Components" ] } }, - "/organizations/{organization}/projects/{projectSlug}/compliance": { + "/organizations/{organization}/projects/{projectSlug}/components": { "get": { "parameters": [ { @@ -28800,10 +28762,7 @@ "content": { "application/json": { "schema": { - "items": { - "type": "array" - }, - "type": "array" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO" } } }, @@ -28821,65 +28780,14 @@ "BearerAuth": [] } ], - "summary": "Get project compliance", + "summary": "Search component occurrences within a project", "tags": [ - "Compliance" + "Components" ] } }, - "/organizations/{organization}/projects/{projectSlug}/compliance-postures": { + "/organizations/{organization}/projects/{projectSlug}/config-files/{config-file}": { "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "List compliance postures paged", - "tags": [ - "Compliance Postures" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/compliance-postures/components/{statementID}": { - "delete": { "parameters": [ { "description": "Organization slug", @@ -28900,9 +28808,9 @@ } }, { - "description": "Statement ID", + "description": "Config file ID", "in": "path", - "name": "statementID", + "name": "config-file", "required": true, "schema": { "type": "string" @@ -28912,13 +28820,13 @@ "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { - "type": "object" + "type": "string" } } }, - "description": "OK" + "description": "Config file content" } }, "security": [ @@ -28932,9 +28840,9 @@ "BearerAuth": [] } ], - "summary": "Delete a compliance statement", + "summary": "Get project config file", "tags": [ - "Compliance Components" + "Projects" ] }, "put": { @@ -28958,9 +28866,9 @@ } }, { - "description": "Statement ID", + "description": "Config file ID", "in": "path", - "name": "statementID", + "name": "config-file", "required": true, "schema": { "type": "string" @@ -28969,27 +28877,26 @@ ], "requestBody": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/controllers.statementPayload", - "summary": "body", - "description": "Request body" + "title": "body", + "type": "string" } } }, - "description": "Request body", + "description": "Config file content", "required": true }, "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" + "type": "string" } } }, - "description": "OK" + "description": "Updated config file content" } }, "security": [ @@ -29003,17 +28910,17 @@ "BearerAuth": [] } ], - "summary": "Update a compliance statement", + "summary": "Update project config file", "tags": [ - "Compliance Components" + "Projects" ] } }, - "/organizations/{organization}/projects/{projectSlug}/compliance-postures/oscal": { + "/organizations/{organization}/projects/{projectSlug}/dependency-proxy-urls/": { "get": { "parameters": [ { - "description": "Organization slug", + "description": "organization slug", "in": "path", "name": "organization", "required": true, @@ -29022,7 +28929,7 @@ } }, { - "description": "Project slug", + "description": "project slug", "in": "path", "name": "projectSlug", "required": true, @@ -29036,6 +28943,9 @@ "content": { "application/json": { "schema": { + "additionalProperties": { + "type": "string" + }, "type": "object" } } @@ -29054,13 +28964,13 @@ "BearerAuth": [] } ], - "summary": "Get OSCAL system security plan", + "summary": "Get project dependency proxy URLs", "tags": [ - "Compliance Postures" + "Dependency Firewall" ] } }, - "/organizations/{organization}/projects/{projectSlug}/compliance-postures/stats": { + "/organizations/{organization}/projects/{projectSlug}/dependency-vulns": { "get": { "parameters": [ { @@ -29080,6 +28990,14 @@ "schema": { "type": "string" } + }, + { + "description": "Search term", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } } ], "responses": { @@ -29087,7 +29005,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureStatsDTO" + "type": "object" } } }, @@ -29105,14 +29023,15 @@ "BearerAuth": [] } ], - "summary": "Get compliance posture stats", + "summary": "List dependency vulnerabilities by project", "tags": [ - "Compliance Postures" + "Vulnerabilities" ] } }, - "/organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}": { + "/organizations/{organization}/projects/{projectSlug}/external/{providerID}": { "get": { + "description": "Returns the full tree of projects, sub-projects, assets, asset versions and artifacts that were dynamically created by an external inventory provider (e.g. k8s-devguard-image-inventory) for the given providerID.", "parameters": [ { "description": "Organization slug", @@ -29133,9 +29052,9 @@ } }, { - "description": "Framework Control ID", + "description": "External provider ID", "in": "path", - "name": "frameworkControlID", + "name": "providerID", "required": true, "schema": { "type": "string" @@ -29147,7 +29066,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" + "items": { + "$ref": "#/components/schemas/dtos.ProjectExternalEntityTree" + }, + "type": "array" } } }, @@ -29165,12 +29087,13 @@ "BearerAuth": [] } ], - "summary": "Get compliance posture for a framework control", + "summary": "List externally managed project/asset tree", "tags": [ - "Compliance Postures" + "External Entity" ] }, "post": { + "description": "Called by external inventory providers (e.g. k8s-devguard-image-inventory) to upsert or delete a dynamically managed project hierarchy. On verb=update, creates or updates the project, sub-project, asset, asset version and artifact, then processes the supplied CycloneDX SBOM and triggers a vulnerability scan. On verb=delete, removes the artifact/asset-version/asset/project entries cascading upward as long as no other data references them.", "parameters": [ { "description": "Organization slug", @@ -29191,9 +29114,9 @@ } }, { - "description": "Framework Control ID", + "description": "External provider ID", "in": "path", - "name": "frameworkControlID", + "name": "providerID", "required": true, "schema": { "type": "string" @@ -29204,31 +29127,17 @@ "content": { "application/json": { "schema": { - "properties": { - "justification": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "title": "body", - "type": "object" + "$ref": "#/components/schemas/dtos.ExternalSubprojectRequestDTO", + "summary": "body", + "description": "Request body" } } }, - "description": "Event data", + "description": "Request body", "required": true }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.CompliancePostureWithDetailsDTO" - } - } - }, "description": "OK" } }, @@ -29243,13 +29152,13 @@ "BearerAuth": [] } ], - "summary": "Create a compliance posture event", + "summary": "Sync or delete an externally managed project/asset tree", "tags": [ - "Compliance Postures" + "External Entity" ] } }, - "/organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}": { + "/organizations/{organization}/projects/{projectSlug}/integrations/webhook/test": { "post": { "parameters": [ { @@ -29269,49 +29178,39 @@ "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.WebhookTestRequestDTO", + "summary": "body", + "description": "Test webhook data" + } + } }, - { - "description": "Framework control ID", - "in": "path", - "name": "frameworkControlID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Compliance component ID", - "in": "path", - "name": "complianceComponentID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/controllers.statementPayload", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", + "description": "Test webhook data", "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO" + "properties": { + "message": { + "type": "string" + }, + "payloadType": { + "type": "string" + } + }, + "type": "object" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -29325,14 +29224,14 @@ "BearerAuth": [] } ], - "summary": "Create a compliance statement for a component", + "summary": "Test webhook integration (project)", "tags": [ - "Compliance Components" + "Webhooks" ] } }, - "/organizations/{organization}/projects/{projectSlug}/components": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/integrations/webhook/test-and-save": { + "post": { "parameters": [ { "description": "Organization slug", @@ -29353,12 +29252,25 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.WebhookCreateRequestDTO", + "summary": "body", + "description": "Webhook data" + } + } + }, + "description": "Webhook data", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO" + "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" } } }, @@ -29376,14 +29288,14 @@ "BearerAuth": [] } ], - "summary": "Search component occurrences within a project", + "summary": "Create webhook integration (project)", "tags": [ - "Components" + "Webhooks" ] } }, - "/organizations/{organization}/projects/{projectSlug}/config-files/{config-file}": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/integrations/webhook/{id}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -29404,9 +29316,9 @@ } }, { - "description": "Config file ID", + "description": "Webhook ID", "in": "path", - "name": "config-file", + "name": "id", "required": true, "schema": { "type": "string" @@ -29415,14 +29327,7 @@ ], "responses": { "200": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "description": "Config file content" + "description": "OK" } }, "security": [ @@ -29436,9 +29341,9 @@ "BearerAuth": [] } ], - "summary": "Get project config file", + "summary": "Delete webhook integration (project)", "tags": [ - "Projects" + "Webhooks" ] }, "put": { @@ -29462,9 +29367,9 @@ } }, { - "description": "Config file ID", + "description": "Webhook ID", "in": "path", - "name": "config-file", + "name": "id", "required": true, "schema": { "type": "string" @@ -29473,26 +29378,27 @@ ], "requestBody": { "content": { - "text/plain": { + "application/json": { "schema": { - "title": "body", - "type": "string" + "$ref": "#/components/schemas/dtos.WebhookUpdateRequestDTO", + "summary": "body", + "description": "Webhook data" } } }, - "description": "Config file content", + "description": "Webhook data", "required": true }, "responses": { "200": { "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" } } }, - "description": "Updated config file content" + "description": "OK" } }, "security": [ @@ -29506,17 +29412,17 @@ "BearerAuth": [] } ], - "summary": "Update project config file", + "summary": "Update webhook integration (project)", "tags": [ - "Projects" + "Webhooks" ] } }, - "/organizations/{organization}/projects/{projectSlug}/dependency-proxy-urls/": { + "/organizations/{organization}/projects/{projectSlug}/logs/": { "get": { "parameters": [ { - "description": "organization slug", + "description": "Organization slug", "in": "path", "name": "organization", "required": true, @@ -29525,72 +29431,50 @@ } }, { - "description": "project slug", + "description": "Project slug", "in": "path", "name": "projectSlug", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] }, { - "PATAuth": [] + "description": "Page number", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } }, { - "BearerAuth": [] - } - ], - "summary": "Get project dependency proxy URLs", - "tags": [ - "Dependency Firewall" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/dependency-vulns": { - "get": { - "parameters": [ + "description": "Page size", + "in": "query", + "name": "pageSize", + "schema": { + "type": "integer" + } + }, { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, + "description": "Search term", + "in": "query", + "name": "search", "schema": { "type": "string" } }, { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, + "description": "Sort query, e.g. sort[createdAt]=desc", + "in": "query", + "name": "sort", "schema": { "type": "string" } }, { - "description": "Search term", + "description": "Filter query, e.g. filterQuery[logs.log_level][is]=error", "in": "query", - "name": "search", + "name": "filterQuery", "schema": { "type": "string" } @@ -29601,7 +29485,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO" } } }, @@ -29619,15 +29503,14 @@ "BearerAuth": [] } ], - "summary": "List dependency vulnerabilities by project", + "summary": "List project logs", "tags": [ - "Vulnerabilities" + "Logs" ] } }, - "/organizations/{organization}/projects/{projectSlug}/external/{providerID}": { + "/organizations/{organization}/projects/{projectSlug}/members": { "get": { - "description": "Returns the full tree of projects, sub-projects, assets, asset versions and artifacts that were dynamically created by an external inventory provider (e.g. k8s-devguard-image-inventory) for the given providerID.", "parameters": [ { "description": "Organization slug", @@ -29646,15 +29529,6 @@ "schema": { "type": "string" } - }, - { - "description": "External provider ID", - "in": "path", - "name": "providerID", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -29663,7 +29537,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/dtos.ProjectExternalEntityTree" + "$ref": "#/components/schemas/dtos.UserDTO" }, "type": "array" } @@ -29683,13 +29557,12 @@ "BearerAuth": [] } ], - "summary": "List externally managed project/asset tree", + "summary": "List project members", "tags": [ - "External Entity" + "Projects" ] }, "post": { - "description": "Called by external inventory providers (e.g. k8s-devguard-image-inventory) to upsert or delete a dynamically managed project hierarchy. On verb=update, creates or updates the project, sub-project, asset, asset version and artifact, then processes the supplied CycloneDX SBOM and triggers a vulnerability scan. On verb=delete, removes the artifact/asset-version/asset/project entries cascading upward as long as no other data references them.", "parameters": [ { "description": "Organization slug", @@ -29708,22 +29581,13 @@ "schema": { "type": "string" } - }, - { - "description": "External provider ID", - "in": "path", - "name": "providerID", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ExternalSubprojectRequestDTO", + "$ref": "#/components/schemas/dtos.ProjectInviteRequest", "summary": "body", "description": "Request body" } @@ -29748,14 +29612,14 @@ "BearerAuth": [] } ], - "summary": "Sync or delete an externally managed project/asset tree", + "summary": "Invite members to project", "tags": [ - "External Entity" + "Projects" ] } }, - "/organizations/{organization}/projects/{projectSlug}/integrations/webhook/test": { - "post": { + "/organizations/{organization}/projects/{projectSlug}/members/{userID}/": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -29774,38 +29638,19 @@ "schema": { "type": "string" } + }, + { + "description": "User ID", + "in": "path", + "name": "userID", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.WebhookTestRequestDTO", - "summary": "body", - "description": "Test webhook data" - } - } - }, - "description": "Test webhook data", - "required": true - }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - }, - "payloadType": { - "type": "string" - } - }, - "type": "object" - } - } - }, "description": "OK" } }, @@ -29820,14 +29665,12 @@ "BearerAuth": [] } ], - "summary": "Test webhook integration (project)", + "summary": "Remove member from project", "tags": [ - "Webhooks" + "Projects" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/integrations/webhook/test-and-save": { - "post": { + }, + "put": { "parameters": [ { "description": "Organization slug", @@ -29846,30 +29689,32 @@ "schema": { "type": "string" } + }, + { + "description": "User ID", + "in": "path", + "name": "userID", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.WebhookCreateRequestDTO", + "$ref": "#/components/schemas/dtos.ProjectChangeRoleRequest", "summary": "body", - "description": "Webhook data" + "description": "Request body" } } }, - "description": "Webhook data", + "description": "Request body", "required": true }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" - } - } - }, "description": "OK" } }, @@ -29884,14 +29729,14 @@ "BearerAuth": [] } ], - "summary": "Create webhook integration (project)", + "summary": "Change member role in project", "tags": [ - "Webhooks" + "Projects" ] } }, - "/organizations/{organization}/projects/{projectSlug}/integrations/webhook/{id}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/pats": { + "get": { "parameters": [ { "description": "Organization slug", @@ -29910,19 +29755,20 @@ "schema": { "type": "string" } - }, - { - "description": "Webhook ID", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/dtos.PATDTO" + }, + "type": "array" + } + } + }, "description": "OK" } }, @@ -29937,12 +29783,12 @@ "BearerAuth": [] } ], - "summary": "Delete webhook integration (project)", + "summary": "List project access tokens", "tags": [ - "Webhooks" + "Authentication" ] }, - "put": { + "post": { "parameters": [ { "description": "Organization slug", @@ -29961,28 +29807,19 @@ "schema": { "type": "string" } - }, - { - "description": "Webhook ID", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.WebhookUpdateRequestDTO", + "$ref": "#/components/schemas/dtos.PatCreateRequest", "summary": "body", - "description": "Webhook data" + "description": "Request body" } } }, - "description": "Webhook data", + "description": "Request body", "required": true }, "responses": { @@ -29990,7 +29827,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.WebhookIntegrationDTO" + "$ref": "#/components/schemas/dtos.PATCreateResponseDTO" } } }, @@ -30008,14 +29845,14 @@ "BearerAuth": [] } ], - "summary": "Update webhook integration (project)", + "summary": "Create project access token", "tags": [ - "Webhooks" + "Authentication" ] } }, - "/organizations/{organization}/projects/{projectSlug}/logs/": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/pats/{tokenID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -30036,41 +29873,10 @@ } }, { - "description": "Page number", - "in": "query", - "name": "page", - "schema": { - "type": "integer" - } - }, - { - "description": "Page size", - "in": "query", - "name": "pageSize", - "schema": { - "type": "integer" - } - }, - { - "description": "Search term", - "in": "query", - "name": "search", - "schema": { - "type": "string" - } - }, - { - "description": "Sort query, e.g. sort[createdAt]=desc", - "in": "query", - "name": "sort", - "schema": { - "type": "string" - } - }, - { - "description": "Filter query, e.g. filterQuery[logs.log_level][is]=error", - "in": "query", - "name": "filterQuery", + "description": "Token ID", + "in": "path", + "name": "tokenID", + "required": true, "schema": { "type": "string" } @@ -30078,13 +29884,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO" - } - } - }, "description": "OK" } }, @@ -30099,13 +29898,13 @@ "BearerAuth": [] } ], - "summary": "List project logs", + "summary": "Delete project access token", "tags": [ - "Logs" + "Authentication" ] } }, - "/organizations/{organization}/projects/{projectSlug}/members": { + "/organizations/{organization}/projects/{projectSlug}/policies": { "get": { "parameters": [ { @@ -30133,7 +29932,7 @@ "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/dtos.UserDTO" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" }, "type": "array" } @@ -30153,12 +29952,14 @@ "BearerAuth": [] } ], - "summary": "List project members", + "summary": "List project policies", "tags": [ - "Projects" + "Policies" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/policies/{policyID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -30177,24 +29978,20 @@ "schema": { "type": "string" } + }, + { + "description": "Policy ID", + "in": "path", + "name": "policyID", + "required": true, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ProjectInviteRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { - "200": { - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -30208,14 +30005,12 @@ "BearerAuth": [] } ], - "summary": "Invite members to project", + "summary": "Disable a policy for a project", "tags": [ - "Projects" + "Policies" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/members/{userID}/": { - "delete": { + }, + "put": { "parameters": [ { "description": "Organization slug", @@ -30236,9 +30031,9 @@ } }, { - "description": "User ID", + "description": "Policy ID", "in": "path", - "name": "userID", + "name": "policyID", "required": true, "schema": { "type": "string" @@ -30246,8 +30041,8 @@ } ], "responses": { - "200": { - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -30261,12 +30056,14 @@ "BearerAuth": [] } ], - "summary": "Remove member from project", + "summary": "Enable a policy for a project", "tags": [ - "Projects" + "Policies" ] - }, - "put": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/releases": { + "get": { "parameters": [ { "description": "Organization slug", @@ -30287,30 +30084,23 @@ } }, { - "description": "User ID", - "in": "path", - "name": "userID", - "required": true, + "description": "Search term", + "in": "query", + "name": "search", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ProjectChangeRoleRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ReleaseDTO" + } + } + }, "description": "OK" } }, @@ -30325,14 +30115,12 @@ "BearerAuth": [] } ], - "summary": "Change member role in project", + "summary": "List releases", "tags": [ - "Projects" + "Releases" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/pats": { - "get": { + }, + "post": { "parameters": [ { "description": "Organization slug", @@ -30353,19 +30141,29 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.ReleaseCreateRequest", + "summary": "body", + "description": "Release data" + } + } + }, + "description": "Release data", + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/dtos.PATDTO" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.ReleaseDTO" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -30379,12 +30177,14 @@ "BearerAuth": [] } ], - "summary": "List project access tokens", + "summary": "Create release", "tags": [ - "Authentication" + "Releases" ] - }, - "post": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/releases/candidates": { + "get": { "parameters": [ { "description": "Organization slug", @@ -30403,27 +30203,22 @@ "schema": { "type": "string" } + }, + { + "description": "Release ID", + "in": "query", + "name": "releaseID", + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.PatCreateRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.PATCreateResponseDTO" + "$ref": "#/components/schemas/dtos.CandidatesResponseDTO" } } }, @@ -30441,13 +30236,13 @@ "BearerAuth": [] } ], - "summary": "Create project access token", + "summary": "List release candidates", "tags": [ - "Authentication" + "Releases" ] } }, - "/organizations/{organization}/projects/{projectSlug}/pats/{tokenID}": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}": { "delete": { "parameters": [ { @@ -30469,9 +30264,9 @@ } }, { - "description": "Token ID", + "description": "Release ID", "in": "path", - "name": "tokenID", + "name": "releaseID", "required": true, "schema": { "type": "string" @@ -30479,8 +30274,8 @@ } ], "responses": { - "200": { - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -30494,13 +30289,11 @@ "BearerAuth": [] } ], - "summary": "Delete project access token", + "summary": "Delete release", "tags": [ - "Authentication" + "Releases" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/policies": { + }, "get": { "parameters": [ { @@ -30520,6 +30313,15 @@ "schema": { "type": "string" } + }, + { + "description": "Release ID", + "in": "path", + "name": "releaseID", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -30527,10 +30329,7 @@ "content": { "application/json": { "schema": { - "items": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.ReleaseDTO" } } }, @@ -30548,14 +30347,12 @@ "BearerAuth": [] } ], - "summary": "List project policies", + "summary": "Get release details", "tags": [ - "Policies" + "Releases" ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/policies/{policyID}": { - "delete": { + }, + "patch": { "parameters": [ { "description": "Organization slug", @@ -30576,18 +30373,38 @@ } }, { - "description": "Policy ID", + "description": "Release ID", "in": "path", - "name": "policyID", + "name": "releaseID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.ReleasePatchRequest", + "summary": "body", + "description": "Release data" + } + } + }, + "description": "Release data", + "required": true + }, "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.ReleaseDTO" + } + } + }, + "description": "OK" } }, "security": [ @@ -30601,12 +30418,14 @@ "BearerAuth": [] } ], - "summary": "Disable a policy for a project", + "summary": "Update release", "tags": [ - "Policies" + "Releases" ] - }, - "put": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/candidates": { + "get": { "parameters": [ { "description": "Organization slug", @@ -30627,18 +30446,24 @@ } }, { - "description": "Policy ID", - "in": "path", - "name": "policyID", - "required": true, + "description": "Release ID", + "in": "query", + "name": "releaseID", "schema": { "type": "string" } } ], "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.CandidatesResponseDTO" + } + } + }, + "description": "OK" } }, "security": [ @@ -30652,13 +30477,13 @@ "BearerAuth": [] } ], - "summary": "Enable a policy for a project", + "summary": "List release candidates", "tags": [ - "Policies" + "Releases" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/csaf.json": { "get": { "parameters": [ { @@ -30680,42 +30505,23 @@ } }, { - "description": "Search term", - "in": "query", - "name": "search", + "description": "Release ID", + "in": "path", + "name": "releaseID", + "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ReleaseDTO" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "List releases", + "responses": null, + "summary": "Get release VEX as CSAF", "tags": [ "Releases" ] - }, + } + }, + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items": { "post": { "parameters": [ { @@ -30735,19 +30541,28 @@ "schema": { "type": "string" } + }, + { + "description": "Release ID", + "in": "path", + "name": "releaseID", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ReleaseCreateRequest", + "$ref": "#/components/schemas/dtos.ReleaseItemDTO", "summary": "body", - "description": "Release data" + "description": "Release item data" } } }, - "description": "Release data", + "description": "Release item data", "required": true }, "responses": { @@ -30755,7 +30570,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ReleaseDTO" + "$ref": "#/components/schemas/dtos.ReleaseItemDTO" } } }, @@ -30773,14 +30588,14 @@ "BearerAuth": [] } ], - "summary": "Create release", + "summary": "Add item to release", "tags": [ "Releases" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/candidates": { - "get": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items/{itemID}": { + "delete": { "parameters": [ { "description": "Organization slug", @@ -30802,23 +30617,26 @@ }, { "description": "Release ID", - "in": "query", + "in": "path", "name": "releaseID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Item ID", + "in": "path", + "name": "itemID", + "required": true, "schema": { "type": "string" } } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.CandidatesResponseDTO" - } - } - }, - "description": "OK" + "204": { + "description": "No Content" } }, "security": [ @@ -30832,14 +30650,14 @@ "BearerAuth": [] } ], - "summary": "List release candidates", + "summary": "Remove item from release", "tags": [ "Releases" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/openvex.json": { + "get": { "parameters": [ { "description": "Organization slug", @@ -30869,27 +30687,14 @@ } } ], - "responses": { - "204": { - "description": "No Content" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Delete release", + "responses": null, + "summary": "Get release VEX as OpenVEX", "tags": [ "Releases" ] - }, + } + }, + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.json": { "get": { "parameters": [ { @@ -30925,7 +30730,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ReleaseDTO" + "type": "object" } } }, @@ -30943,12 +30748,14 @@ "BearerAuth": [] } ], - "summary": "Get release details", + "summary": "Get release SBOM as JSON", "tags": [ "Releases" ] - }, - "patch": { + } + }, + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.xml": { + "get": { "parameters": [ { "description": "Organization slug", @@ -30978,25 +30785,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ReleasePatchRequest", - "summary": "body", - "description": "Release data" - } - } - }, - "description": "Release data", - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ReleaseDTO" + "type": "object" } } }, @@ -31014,13 +30808,13 @@ "BearerAuth": [] } ], - "summary": "Update release", + "summary": "Get release SBOM as XML", "tags": [ "Releases" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/candidates": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/average-fixing-time/": { "get": { "parameters": [ { @@ -31043,8 +30837,9 @@ }, { "description": "Release ID", - "in": "query", + "in": "path", "name": "releaseID", + "required": true, "schema": { "type": "string" } @@ -31055,7 +30850,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.CandidatesResponseDTO" + "$ref": "#/components/schemas/dtos.RemediationTimeAverages" } } }, @@ -31073,13 +30868,13 @@ "BearerAuth": [] } ], - "summary": "List release candidates", + "summary": "Get average remediation times for a release", "tags": [ - "Releases" + "Statistics" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/csaf.json": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/risk-history/": { "get": { "parameters": [ { @@ -31108,69 +30903,39 @@ "schema": { "type": "string" } - } - ], - "responses": null, - "summary": "Get release VEX as CSAF", - "tags": [ - "Releases" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items": { - "post": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } }, { - "description": "Project slug", - "in": "path", - "name": "projectSlug", + "description": "Start date (YYYY-MM-DD)", + "in": "query", + "name": "start", "required": true, "schema": { "type": "string" } }, { - "description": "Release ID", - "in": "path", - "name": "releaseID", + "description": "End date (YYYY-MM-DD)", + "in": "query", + "name": "end", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ReleaseItemDTO", - "summary": "body", - "description": "Release item data" - } - } - }, - "description": "Release item data", - "required": true - }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.ReleaseItemDTO" + "items": { + "$ref": "#/components/schemas/dtos.RiskHistoryDTO" + }, + "type": "array" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -31184,14 +30949,14 @@ "BearerAuth": [] } ], - "summary": "Add item to release", + "summary": "Get risk history for a release", "tags": [ - "Releases" + "Statistics" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items/{itemID}": { - "delete": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.json": { + "get": { "parameters": [ { "description": "Organization slug", @@ -31219,20 +30984,18 @@ "schema": { "type": "string" } - }, - { - "description": "Item ID", - "in": "path", - "name": "itemID", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { - "204": { - "description": "No Content" + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" } }, "security": [ @@ -31246,51 +31009,13 @@ "BearerAuth": [] } ], - "summary": "Remove item from release", - "tags": [ - "Releases" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/openvex.json": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Release ID", - "in": "path", - "name": "releaseID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": null, - "summary": "Get release VEX as OpenVEX", + "summary": "Get release VEX as JSON", "tags": [ "Releases" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.json": { + "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.xml": { "get": { "parameters": [ { @@ -31344,13 +31069,13 @@ "BearerAuth": [] } ], - "summary": "Get release SBOM as JSON", + "summary": "Get release VEX as XML", "tags": [ "Releases" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.xml": { + "/organizations/{organization}/projects/{projectSlug}/resources": { "get": { "parameters": [ { @@ -31372,10 +31097,17 @@ } }, { - "description": "Release ID", - "in": "path", - "name": "releaseID", - "required": true, + "description": "Search query for filtering sub-projects and assets", + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "description": "Only list children of this project ID", + "in": "query", + "name": "parentId", "schema": { "type": "string" } @@ -31386,7 +31118,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectAssetDTO" } } }, @@ -31404,13 +31136,13 @@ "BearerAuth": [] } ], - "summary": "Get release SBOM as XML", + "summary": "List sub-projects and assets", "tags": [ - "Releases" + "Projects" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/average-fixing-time/": { + "/organizations/{organization}/settings": { "get": { "parameters": [ { @@ -31421,24 +31153,6 @@ "schema": { "type": "string" } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Release ID", - "in": "path", - "name": "releaseID", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -31446,7 +31160,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dtos.RemediationTimeAverages" + "$ref": "#/components/schemas/dtos.OrgSettingsDTO" } } }, @@ -31464,14 +31178,15 @@ "BearerAuth": [] } ], - "summary": "Get average remediation times for a release", + "summary": "Get organization admin settings", "tags": [ - "Statistics" + "Organizations" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/risk-history/": { + "/organizations/{organization}/stats/vuln-statistics/": { "get": { + "description": "Returns aggregated security statistics for an organization, including vulnerability distribution, top vulnerable projects/assets/artifacts, most used components, common CVEs, risk history, remediation metrics, and ecosystem usage. All queries are executed in parallel.", "parameters": [ { "description": "Organization slug", @@ -31483,102 +31198,43 @@ } }, { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, + "description": "Max number of top vulnerable projects/assets/artifacts to return (default: 5)", + "in": "query", + "name": "orgComponentsLimit", "schema": { - "type": "string" + "type": "integer" } }, { - "description": "Release ID", - "in": "path", - "name": "releaseID", - "required": true, + "description": "Max number of top CVEs to return (default: 5)", + "in": "query", + "name": "topCVEsLimit", "schema": { - "type": "string" + "type": "integer" } }, { - "description": "Start date (YYYY-MM-DD)", + "description": "Max number of top components to return (default: 5)", "in": "query", - "name": "start", - "required": true, + "name": "topComponentsLimit", "schema": { - "type": "string" + "type": "integer" } }, { - "description": "End date (YYYY-MM-DD)", + "description": "Max number of top ecosystems to return (default: 5)", "in": "query", - "name": "end", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/dtos.RiskHistoryDTO" - }, - "type": "array" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get risk history for a release", - "tags": [ - "Statistics" - ] - } - }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.json": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, + "name": "topEcosystemsLimit", "schema": { - "type": "string" + "type": "integer" } }, { - "description": "Release ID", - "in": "path", - "name": "releaseID", - "required": true, + "description": "Bypass the 15 minute statistics cache", + "in": "query", + "name": "forceRefresh", "schema": { - "type": "string" + "type": "boolean" } } ], @@ -31587,31 +31243,20 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/dtos.OrgOverview" } } }, "description": "OK" } }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get release VEX as JSON", + "summary": "Get organization statistics overview", "tags": [ - "Releases" + "Organizations" ] } }, - "/organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.xml": { + "/organizations/{organization}/trigger-sync": { "get": { "parameters": [ { @@ -31622,36 +31267,21 @@ "schema": { "type": "string" } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Release ID", - "in": "path", - "name": "releaseID", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { - "200": { + "204": { + "description": "No Content" + }, + "400": { "content": { "application/json": { "schema": { - "type": "object" + "type": "string" } } }, - "description": "OK" + "description": "organization is not an external entity provider" } }, "security": [ @@ -31660,61 +31290,25 @@ }, { "PATAuth": [] - }, - { - "BearerAuth": [] } ], - "summary": "Get release VEX as XML", + "summary": "Trigger a sync for the given org", "tags": [ - "Releases" + "Organizations" ] } }, - "/organizations/{organization}/projects/{projectSlug}/resources": { + "/pats": { "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Search query for filtering sub-projects and assets", - "in": "query", - "name": "search", - "schema": { - "type": "string" - } - }, - { - "description": "Only list children of this project ID", - "in": "query", - "name": "parentId", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectAssetDTO" + "items": { + "$ref": "#/components/schemas/dtos.PATDTO" + }, + "type": "array" } } }, @@ -31732,215 +31326,25 @@ "BearerAuth": [] } ], - "summary": "List sub-projects and assets", + "summary": "List personal access tokens", "tags": [ - "Projects" + "Authentication" ] - } - }, - "/organizations/{organization}/settings": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" + }, + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.PatCreateRequest", + "summary": "body", + "description": "Request body" + } } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.OrgSettingsDTO" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get organization admin settings", - "tags": [ - "Organizations" - ] - } - }, - "/organizations/{organization}/stats/vuln-statistics/": { - "get": { - "description": "Returns aggregated security statistics for an organization, including vulnerability distribution, top vulnerable projects/assets/artifacts, most used components, common CVEs, risk history, remediation metrics, and ecosystem usage. All queries are executed in parallel.", - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Max number of top vulnerable projects/assets/artifacts to return (default: 5)", - "in": "query", - "name": "orgComponentsLimit", - "schema": { - "type": "integer" - } - }, - { - "description": "Max number of top CVEs to return (default: 5)", - "in": "query", - "name": "topCVEsLimit", - "schema": { - "type": "integer" - } - }, - { - "description": "Max number of top components to return (default: 5)", - "in": "query", - "name": "topComponentsLimit", - "schema": { - "type": "integer" - } - }, - { - "description": "Max number of top ecosystems to return (default: 5)", - "in": "query", - "name": "topEcosystemsLimit", - "schema": { - "type": "integer" - } - }, - { - "description": "Bypass the 15 minute statistics cache", - "in": "query", - "name": "forceRefresh", - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.OrgOverview" - } - } - }, - "description": "OK" - } - }, - "summary": "Get organization statistics overview", - "tags": [ - "Organizations" - ] - } - }, - "/organizations/{organization}/trigger-sync": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - }, - "description": "organization is not an external entity provider" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - } - ], - "summary": "Trigger a sync for the given org", - "tags": [ - "Organizations" - ] - } - }, - "/pats": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/dtos.PATDTO" - }, - "type": "array" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "List personal access tokens", - "tags": [ - "Authentication" - ] - }, - "post": { - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.PatCreateRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, + }, + "description": "Request body", + "required": true + }, "responses": { "200": { "content": { @@ -31978,888 +31382,48 @@ }, "security": [ { - "CookieAuth": [] - } - ], - "summary": "Create personal access token", - "tags": [ - "Authentication" - ] - } - }, - "/pats/revoke-by-private-key": { - "post": { - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.RevokeByPrivateKeyRequest", - "summary": "body", - "description": "Request body" - } - } - }, - "description": "Request body", - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - }, - "summary": "Revoke PAT by private key", - "tags": [ - "Authentication" - ] - } - }, - "/pats/{tokenID}": { - "delete": { - "parameters": [ - { - "description": "Token ID", - "in": "path", - "name": "tokenID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Delete personal access token", - "tags": [ - "Authentication" - ] - } - }, - "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge}": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Badge type", - "in": "path", - "name": "badge", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "image/svg+xml": { - "schema": { - "type": "string" - } - } - }, - "description": "SVG badge" - } - }, - "summary": "Get asset badge", - "tags": [ - "Assets" - ] - } - }, - "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "CSAF advisory in JSON format" - } - }, - "summary": "Get an aggregated CSAF VEX for all of the artifact's vulnerabilities", - "tags": [ - "Artifacts" - ] - } - }, - "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Artifact name", - "in": "path", - "name": "artifactName", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "OpenVEX document in JSON format" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get VEX in OpenVEX JSON format", - "tags": [ - "Artifacts" - ] - } - }, - "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Artifact name", - "in": "path", - "name": "artifactName", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "CycloneDX BOM in JSON format" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get SBOM in JSON format", - "tags": [ - "Artifacts" - ] - } - }, - "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json": { - "get": { - "parameters": [ - { - "description": "Organization slug", - "in": "path", - "name": "organization", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Project slug", - "in": "path", - "name": "projectSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset slug", - "in": "path", - "name": "assetSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset version slug", - "in": "path", - "name": "assetVersionSlug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Artifact name", - "in": "path", - "name": "artifactName", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - }, - "description": "CycloneDX VEX in JSON format" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Get VEX in JSON format", - "tags": [ - "Artifacts" - ] - } - }, - "/renovate/recommendation": { - "get": { - "parameters": [ - { - "description": "Package name", - "in": "query", - "name": "packageName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Current version value", - "in": "query", - "name": "currentValue", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.Recommendation" - } - } - }, - "description": "OK" - } - }, - "summary": "Get recommended fixed version for a package", - "tags": [ - "Vulnerabilities" - ] - } - }, - "/resolve": { - "get": { - "description": "Resolves an organization, project or asset UUID to the slugs the frontend needs to build a human readable URL. Exactly one of the query parameters must be set.", - "parameters": [ - { - "description": "Organization ID", - "in": "query", - "name": "orgId", - "schema": { - "type": "string" - } - }, - { - "description": "Project ID", - "in": "query", - "name": "projectId", - "schema": { - "type": "string" - } - }, - { - "description": "Asset ID", - "in": "query", - "name": "assetId", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.PermalinkResponse" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Resolve a permalink", - "tags": [ - "Organizations" - ] - } - }, - "/sarif-scan": { - "post": { - "deprecated": true, - "parameters": [ - { - "description": "Asset version name", - "in": "header", - "name": "X-Asset-Ref", - "schema": { - "type": "string" - } - }, - { - "description": "Tag flag", - "in": "header", - "name": "X-Tag", - "schema": { - "type": "string" - } - }, - { - "description": "Default branch", - "in": "header", - "name": "X-Asset-Default-Branch", - "schema": { - "type": "string" - } - }, - { - "description": "Scanner ID", - "in": "header", - "name": "X-Scanner", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Asset name as \u003corganization\u003e/\u003cproject\u003e/\u003casset\u003e", - "in": "header", - "name": "X-Asset-Name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "title": "body", - "type": "object" - } - } - }, - "description": "SARIF scan result", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.FirstPartyScanResponse" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Scan for first-party vulnerabilities", - "tags": [ - "Scanning" - ] - } - }, - "/sarif-scan-unauthenticated": { - "post": { - "deprecated": true, - "parameters": [ - { - "description": "Scanner ID", - "in": "header", - "name": "X-Scanner", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "title": "body", - "type": "object" - } - } - }, - "description": "SARIF scan result", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.FirstPartyScanResponse" - } - } - }, - "description": "OK" - } - }, - "summary": "Scan for first-party vulnerabilities without authentication (scan-only, results are not saved)", - "tags": [ - "Scanning" - ] - } - }, - "/scan": { - "post": { - "deprecated": true, - "parameters": [ - { - "description": "Asset version name", - "in": "header", - "name": "X-Asset-Ref", - "schema": { - "type": "string" - } - }, - { - "description": "Artifact name", - "in": "header", - "name": "X-Artifact-Name", - "schema": { - "type": "string" - } - }, - { - "description": "Tag flag", - "in": "header", - "name": "X-Tag", - "schema": { - "type": "string" - } - }, - { - "description": "Default branch", - "in": "header", - "name": "X-Asset-Default-Branch", - "schema": { - "type": "string" - } - }, - { - "description": "Origin", - "in": "header", - "name": "X-Origin", - "schema": { - "type": "string" - } - }, - { - "description": "Scanner ID", - "in": "header", - "name": "X-Scanner", - "schema": { - "type": "string" - } - }, - { - "description": "Asset name as \u003corganization\u003e/\u003cproject\u003e/\u003casset\u003e", - "in": "header", - "name": "X-Asset-Name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "title": "body", - "type": "object" - } - } - }, - "description": "CycloneDX SBOM", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ScanResponse" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Scan for dependency vulnerabilities", - "tags": [ - "Scanning" - ] - } - }, - "/scan-unauthenticated": { - "post": { - "deprecated": true, - "requestBody": { - "content": { - "text/plain": { - "schema": { - "title": "body", - "type": "object" - } - } - }, - "description": "CycloneDX SBOM", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/dtos.ScanResponse" - } - } - }, - "description": "OK" - } - }, - "summary": "Scan for dependency vulnerabilities without authentication (scan-only, results are not saved)", - "tags": [ - "Scanning" - ] - } - }, - "/trigger-sync": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/dtos.OrgDTO" - }, - "type": "array" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "CookieAuth": [] - }, - { - "PATAuth": [] - } - ], - "summary": "Trigger a sync for the current session's org", - "tags": [ - "Organizations" - ] - } - }, - "/v2": { - "head": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "PATAuth": [] - }, - { - "BearerAuth": [] + "CookieAuth": [] } ], - "summary": "OCI Distribution Spec v2 version check", + "summary": "Create personal access token", "tags": [ - "Dependency Firewall" + "Authentication" ] } }, - "/v2/": { - "get": { + "/pats/revoke-by-private-key": { + "post": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.RevokeByPrivateKeyRequest", + "summary": "body", + "description": "Request body" + } + } + }, + "description": "Request body", + "required": true + }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - } - }, "description": "OK" } }, - "security": [ - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "OCI Distribution Spec v2 version check", + "summary": "Revoke PAT by private key", "tags": [ - "Dependency Firewall" + "Authentication" ] } }, - "/v2/{registry}/{image}/blobs/{digest}": { - "get": { + "/pats/{tokenID}": { + "delete": { "parameters": [ { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "registry hostname", - "in": "path", - "name": "registry", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "image namespace", - "in": "path", - "name": "namespace", - "schema": { - "type": "string" - } - }, - { - "description": "image name", - "in": "path", - "name": "image", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "blob digest", + "description": "Token ID", "in": "path", - "name": "digest", + "name": "tokenID", "required": true, "schema": { "type": "string" @@ -32868,17 +31432,13 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "type": "file" - } - } - }, "description": "OK" } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -32886,51 +31446,46 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image blob download", + "summary": "Delete personal access token", "tags": [ - "Dependency Firewall" + "Authentication" ] - }, - "head": { + } + }, + "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge}": { + "get": { "parameters": [ { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "registry hostname", + "description": "Organization slug", "in": "path", - "name": "registry", + "name": "organization", "required": true, "schema": { "type": "string" } }, { - "description": "image namespace", + "description": "Project slug", "in": "path", - "name": "namespace", + "name": "projectSlug", + "required": true, "schema": { "type": "string" } }, { - "description": "image name", + "description": "Asset slug", "in": "path", - "name": "image", + "name": "assetSlug", "required": true, "schema": { "type": "string" } }, { - "description": "blob digest", + "description": "Badge type", "in": "path", - "name": "digest", + "name": "badge", "required": true, "schema": { "type": "string" @@ -32940,142 +31495,84 @@ "responses": { "200": { "content": { - "application/json": { + "image/svg+xml": { "schema": { - "type": "file" + "type": "string" } } }, - "description": "OK" + "description": "SVG badge" } }, - "security": [ - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Proxy OCI image blob download", + "summary": "Get asset badge", "tags": [ - "Dependency Firewall" + "Assets" ] } }, - "/v2/{registry}/{image}/manifests/{reference}": { + "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json": { "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "registry hostname", - "in": "path", - "name": "registry", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "image namespace", - "in": "path", - "name": "namespace", - "schema": { - "type": "string" - } - }, - { - "description": "image name", - "in": "path", - "name": "image", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "tag or digest", - "in": "path", - "name": "reference", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "additionalProperties": {}, "type": "object" } } }, - "description": "OK" + "description": "CSAF advisory in JSON format" } }, - "security": [ - { - "PATAuth": [] - }, - { - "BearerAuth": [] - } - ], - "summary": "Proxy OCI image manifest fetch", + "summary": "Get an aggregated CSAF VEX for all of the artifact's vulnerabilities", "tags": [ - "Dependency Firewall" + "Artifacts" ] - }, - "head": { + } + }, + "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json": { + "get": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Organization slug", "in": "path", - "name": "secret", + "name": "organization", + "required": true, "schema": { "type": "string" } }, { - "description": "registry hostname", + "description": "Project slug", "in": "path", - "name": "registry", + "name": "projectSlug", "required": true, "schema": { "type": "string" } }, { - "description": "image namespace", + "description": "Asset slug", "in": "path", - "name": "namespace", + "name": "assetSlug", + "required": true, "schema": { "type": "string" } }, { - "description": "image name", + "description": "Asset version slug", "in": "path", - "name": "image", + "name": "assetVersionSlug", "required": true, "schema": { "type": "string" } }, { - "description": "tag or digest", + "description": "Artifact name", "in": "path", - "name": "reference", + "name": "artifactName", "required": true, "schema": { "type": "string" @@ -33087,15 +31584,17 @@ "content": { "application/json": { "schema": { - "additionalProperties": {}, "type": "object" } } }, - "description": "OK" + "description": "OpenVEX document in JSON format" } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -33103,53 +31602,55 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image manifest fetch", + "summary": "Get VEX in OpenVEX JSON format", "tags": [ - "Dependency Firewall" + "Artifacts" ] } }, - "/v2/{registry}/{image}/referrers/{digest}": { + "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json": { "get": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Organization slug", "in": "path", - "name": "secret", + "name": "organization", + "required": true, "schema": { "type": "string" } }, { - "description": "registry hostname", + "description": "Project slug", "in": "path", - "name": "registry", + "name": "projectSlug", "required": true, "schema": { "type": "string" } }, { - "description": "image namespace", + "description": "Asset slug", "in": "path", - "name": "namespace", + "name": "assetSlug", + "required": true, "schema": { "type": "string" } }, { - "description": "image name", + "description": "Asset version slug", "in": "path", - "name": "image", + "name": "assetVersionSlug", "required": true, "schema": { "type": "string" } }, { - "description": "subject digest", + "description": "Artifact name", "in": "path", - "name": "digest", + "name": "artifactName", "required": true, "schema": { "type": "string" @@ -33161,15 +31662,17 @@ "content": { "application/json": { "schema": { - "additionalProperties": {}, "type": "object" } } }, - "description": "OK" + "description": "CycloneDX BOM in JSON format" } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -33177,44 +31680,55 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image referrers list", + "summary": "Get SBOM in JSON format", "tags": [ - "Dependency Firewall" + "Artifacts" ] } }, - "/v2/{registry}/{image}/tags/list": { + "/public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json": { "get": { "parameters": [ { - "description": "dependency proxy secret", + "description": "Organization slug", "in": "path", - "name": "secret", + "name": "organization", + "required": true, "schema": { "type": "string" } }, { - "description": "registry hostname", + "description": "Project slug", "in": "path", - "name": "registry", + "name": "projectSlug", "required": true, "schema": { "type": "string" } }, { - "description": "image namespace", + "description": "Asset slug", "in": "path", - "name": "namespace", + "name": "assetSlug", + "required": true, "schema": { "type": "string" } }, { - "description": "image name", + "description": "Asset version slug", "in": "path", - "name": "image", + "name": "assetVersionSlug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Artifact name", + "in": "path", + "name": "artifactName", "required": true, "schema": { "type": "string" @@ -33226,15 +31740,17 @@ "content": { "application/json": { "schema": { - "additionalProperties": {}, "type": "object" } } }, - "description": "OK" + "description": "CycloneDX VEX in JSON format" } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -33242,54 +31758,76 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image tags list", + "summary": "Get VEX in JSON format", "tags": [ - "Dependency Firewall" + "Artifacts" ] } }, - "/v2/{registry}/{namespace}/{image}/blobs/{digest}": { + "/renovate/recommendation": { "get": { "parameters": [ { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", + "description": "Package name", + "in": "query", + "name": "packageName", + "required": true, "schema": { "type": "string" } }, { - "description": "registry hostname", - "in": "path", - "name": "registry", + "description": "Current version value", + "in": "query", + "name": "currentValue", "required": true, "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.Recommendation" + } + } + }, + "description": "OK" + } + }, + "summary": "Get recommended fixed version for a package", + "tags": [ + "Vulnerabilities" + ] + } + }, + "/resolve": { + "get": { + "description": "Resolves an organization, project or asset UUID to the slugs the frontend needs to build a human readable URL. Exactly one of the query parameters must be set.", + "parameters": [ { - "description": "image namespace", - "in": "path", - "name": "namespace", + "description": "Organization ID", + "in": "query", + "name": "orgId", "schema": { "type": "string" } }, { - "description": "image name", - "in": "path", - "name": "image", - "required": true, + "description": "Project ID", + "in": "query", + "name": "projectId", "schema": { "type": "string" } }, { - "description": "blob digest", - "in": "path", - "name": "digest", - "required": true, + "description": "Asset ID", + "in": "query", + "name": "assetId", "schema": { "type": "string" } @@ -33300,7 +31838,7 @@ "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/dtos.PermalinkResponse" } } }, @@ -33308,6 +31846,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -33315,63 +31856,77 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image blob download", + "summary": "Resolve a permalink", "tags": [ - "Dependency Firewall" + "Organizations" ] - }, - "head": { + } + }, + "/sarif-scan": { + "post": { + "deprecated": true, "parameters": [ { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", + "description": "Asset version name", + "in": "header", + "name": "X-Asset-Ref", "schema": { "type": "string" } }, { - "description": "registry hostname", - "in": "path", - "name": "registry", - "required": true, + "description": "Tag flag", + "in": "header", + "name": "X-Tag", "schema": { "type": "string" } }, { - "description": "image namespace", - "in": "path", - "name": "namespace", + "description": "Default branch", + "in": "header", + "name": "X-Asset-Default-Branch", "schema": { "type": "string" } }, { - "description": "image name", - "in": "path", - "name": "image", + "description": "Scanner ID", + "in": "header", + "name": "X-Scanner", "required": true, "schema": { "type": "string" } }, { - "description": "blob digest", - "in": "path", - "name": "digest", + "description": "Asset name as \u003corganization\u003e/\u003cproject\u003e/\u003casset\u003e", + "in": "header", + "name": "X-Asset-Name", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "title": "body", + "type": "object" + } + } + }, + "description": "SARIF scan result", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "type": "file" + "$ref": "#/components/schemas/dtos.FirstPartyScanResponse" } } }, @@ -33379,6 +31934,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -33386,66 +31944,136 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image blob download", + "summary": "Scan for first-party vulnerabilities", "tags": [ - "Dependency Firewall" + "Scanning" ] } }, - "/v2/{registry}/{namespace}/{image}/manifests/{reference}": { - "get": { + "/sarif-scan-unauthenticated": { + "post": { + "deprecated": true, + "parameters": [ + { + "description": "Scanner ID", + "in": "header", + "name": "X-Scanner", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "title": "body", + "type": "object" + } + } + }, + "description": "SARIF scan result", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.FirstPartyScanResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Scan for first-party vulnerabilities without authentication (scan-only, results are not saved)", + "tags": [ + "Scanning" + ] + } + }, + "/scan": { + "post": { + "deprecated": true, "parameters": [ { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", + "description": "Asset version name", + "in": "header", + "name": "X-Asset-Ref", + "schema": { + "type": "string" + } + }, + { + "description": "Artifact name", + "in": "header", + "name": "X-Artifact-Name", + "schema": { + "type": "string" + } + }, + { + "description": "Tag flag", + "in": "header", + "name": "X-Tag", "schema": { "type": "string" } }, { - "description": "registry hostname", - "in": "path", - "name": "registry", - "required": true, + "description": "Default branch", + "in": "header", + "name": "X-Asset-Default-Branch", "schema": { "type": "string" } }, { - "description": "image namespace", - "in": "path", - "name": "namespace", + "description": "Origin", + "in": "header", + "name": "X-Origin", "schema": { "type": "string" } }, { - "description": "image name", - "in": "path", - "name": "image", - "required": true, + "description": "Scanner ID", + "in": "header", + "name": "X-Scanner", "schema": { "type": "string" } }, { - "description": "tag or digest", - "in": "path", - "name": "reference", + "description": "Asset name as \u003corganization\u003e/\u003cproject\u003e/\u003casset\u003e", + "in": "header", + "name": "X-Asset-Name", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "title": "body", + "type": "object" + } + } + }, + "description": "CycloneDX SBOM", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "additionalProperties": {}, - "type": "object" + "$ref": "#/components/schemas/dtos.ScanResponse" } } }, @@ -33453,6 +32081,9 @@ } }, "security": [ + { + "CookieAuth": [] + }, { "PATAuth": [] }, @@ -33460,64 +32091,56 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image manifest fetch", + "summary": "Scan for dependency vulnerabilities", "tags": [ - "Dependency Firewall" + "Scanning" ] - }, - "head": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "registry hostname", - "in": "path", - "name": "registry", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "image namespace", - "in": "path", - "name": "namespace", - "schema": { - "type": "string" - } - }, - { - "description": "image name", - "in": "path", - "name": "image", - "required": true, - "schema": { - "type": "string" + } + }, + "/scan-unauthenticated": { + "post": { + "deprecated": true, + "requestBody": { + "content": { + "text/plain": { + "schema": { + "title": "body", + "type": "object" + } } }, - { - "description": "tag or digest", - "in": "path", - "name": "reference", - "required": true, - "schema": { - "type": "string" - } + "description": "CycloneDX SBOM", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dtos.ScanResponse" + } + } + }, + "description": "OK" } - ], + }, + "summary": "Scan for dependency vulnerabilities without authentication (scan-only, results are not saved)", + "tags": [ + "Scanning" + ] + } + }, + "/trigger-sync": { + "get": { "responses": { "200": { "content": { "application/json": { "schema": { - "additionalProperties": {}, - "type": "object" + "items": { + "$ref": "#/components/schemas/dtos.OrgDTO" + }, + "type": "array" } } }, @@ -33526,71 +32149,28 @@ }, "security": [ { - "PATAuth": [] + "CookieAuth": [] }, { - "BearerAuth": [] + "PATAuth": [] } ], - "summary": "Proxy OCI image manifest fetch", + "summary": "Trigger a sync for the current session's org", "tags": [ - "Dependency Firewall" + "Organizations" ] } }, - "/v2/{registry}/{namespace}/{image}/referrers/{digest}": { - "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "registry hostname", - "in": "path", - "name": "registry", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "image namespace", - "in": "path", - "name": "namespace", - "schema": { - "type": "string" - } - }, - { - "description": "image name", - "in": "path", - "name": "image", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "subject digest", - "in": "path", - "name": "digest", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v2": { + "head": { "responses": { "200": { "content": { "application/json": { "schema": { - "additionalProperties": {}, + "additionalProperties": { + "type": "string" + }, "type": "object" } } @@ -33606,56 +32186,22 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image referrers list", + "summary": "OCI Distribution Spec v2 version check", "tags": [ "Dependency Firewall" ] } }, - "/v2/{registry}/{namespace}/{image}/tags/list": { + "/v2/": { "get": { - "parameters": [ - { - "description": "dependency proxy secret", - "in": "path", - "name": "secret", - "schema": { - "type": "string" - } - }, - { - "description": "registry hostname", - "in": "path", - "name": "registry", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "image namespace", - "in": "path", - "name": "namespace", - "schema": { - "type": "string" - } - }, - { - "description": "image name", - "in": "path", - "name": "image", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "content": { "application/json": { "schema": { - "additionalProperties": {}, + "additionalProperties": { + "type": "string" + }, "type": "object" } } @@ -33671,7 +32217,7 @@ "BearerAuth": [] } ], - "summary": "Proxy OCI image tags list", + "summary": "OCI Distribution Spec v2 version check", "tags": [ "Dependency Firewall" ] @@ -33684,6 +32230,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -33755,6 +32302,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -33828,6 +32376,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -33900,6 +32449,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -33974,6 +32524,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -34048,6 +32599,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -34113,6 +32665,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -34184,6 +32737,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -34257,6 +32811,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -34329,6 +32884,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -34403,6 +32959,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } @@ -34477,6 +33034,7 @@ "description": "dependency proxy secret", "in": "path", "name": "secret", + "required": true, "schema": { "type": "string" } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 4c7cb1070..8cf89bcbc 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -10815,28 +10815,24 @@ components: - 1000000000 - 60000000000 - 3600000000000 + - -9223372036854775808 + - 9223372036854775807 - 1 - 1000 - 1000000 - 1000000000 - 60000000000 - 3600000000000 - - 1 - - 1000 - - 1000000 - - 1000000000 - - 1 - - 1000 - - 1000000 - - 1000000000 - - 60000000000 - - 3600000000000 + - -9223372036854775808 + - 9223372036854775807 - 1 - 1000 - 1000000 - 1000000000 - 60000000000 - 3600000000000 + - -9223372036854775808 + - 9223372036854775807 - 1 - 1000 - 1000000 @@ -10853,28 +10849,24 @@ components: - Second - Minute - Hour + - minDuration + - maxDuration - Nanosecond - Microsecond - Millisecond - Second - Minute - Hour - - Nanosecond - - Microsecond - - Millisecond - - Second - - Nanosecond - - Microsecond - - Millisecond - - Second - - Minute - - Hour + - minDuration + - maxDuration - Nanosecond - Microsecond - Millisecond - Second - Minute - Hour + - minDuration + - maxDuration - Nanosecond - Microsecond - Millisecond @@ -11571,6 +11563,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11592,6 +11585,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11613,6 +11607,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11634,6 +11629,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11655,6 +11651,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11676,6 +11673,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11697,6 +11695,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11719,6 +11718,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: npm package name @@ -11756,6 +11756,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: npm package name @@ -11792,6 +11793,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: npm package name @@ -11829,6 +11831,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: npm package name @@ -11865,6 +11868,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string responses: @@ -11886,6 +11890,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: PyPI package name @@ -11907,75 +11912,87 @@ paths: summary: Proxy PyPI simple index metadata tags: - Dependency Firewall - /dependency-proxy/composer/{path}: + /health: get: - parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string responses: "200": content: application/json: schema: - type: file + properties: + status: + type: string + type: object description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy Composer repository request + "503": + content: + application/json: + schema: + properties: + error: + type: string + status: + type: string + type: object + description: Service Unavailable + summary: Liveness and readiness check tags: - - Dependency Firewall - /dependency-proxy/deb/{path}: + - System + /info: get: - parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string responses: "200": content: application/json: schema: - type: file + $ref: '#/components/schemas/dtos.InfoResponse' description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy Debian repository request + summary: Runtime, build and database diagnostics tags: - - Dependency Firewall - /dependency-proxy/go: + - System + /instance-settings: get: - parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string responses: "200": content: application/json: schema: - type: file + $ref: '#/components/schemas/dtos.InstanceSettingsDTO' + description: OK + summary: Get public instance settings + tags: + - Admin + /integrations/repositories: + get: + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/dtos.GitRepository' + type: array description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy Go module requests + summary: List repositories from integrations for the session tags: - - Dependency Firewall - /dependency-proxy/go/{path}: + - Integrations + /lookup: get: parameters: - - description: dependency proxy secret - in: path - name: secret + - description: Provider name + in: query + name: provider + required: true + schema: + type: string + - description: Repository ID + in: query + name: id + required: true schema: type: string responses: @@ -11983,99 +12000,112 @@ paths: content: application/json: schema: - type: file + $ref: '#/components/schemas/dtos.LookupResponse' description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy Go module requests + summary: Lookup asset by provider tags: - - Dependency Firewall - /dependency-proxy/maven/{path}: + - Assets + /oauth2/gitlab/{integrationName}: get: parameters: - - description: dependency proxy secret + - description: Integration name in: path - name: secret + name: integrationName + required: true schema: type: string responses: "200": - content: - application/json: - schema: - type: file description: OK security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy Maven repository request + - CookieAuth: [] + summary: GitLab OAuth2 login tags: - - Dependency Firewall - /dependency-proxy/npm/-/{path}: + - Integrations + /oauth2/gitlab/callback/{integrationName}: get: parameters: - - description: dependency proxy secret + - description: Integration name in: path - name: secret + name: integrationName + required: true schema: type: string + responses: + "200": + description: OK + security: + - CookieAuth: [] + summary: GitLab OAuth2 callback + tags: + - Integrations + /organizations: + get: responses: "200": content: application/json: schema: - additionalProperties: {} - type: object + items: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org' + type: array description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy npm registry API request + summary: List organizations tags: - - Dependency Firewall + - Organizations post: - parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.OrgCreateRequest' + description: Request body + summary: body + description: Request body + required: true responses: "200": content: application/json: schema: - additionalProperties: {} - type: object + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org' description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy npm registry API request + summary: Create organization tags: - - Dependency Firewall - /dependency-proxy/npm/{package}: - get: + - Organizations + /organizations/{organization}: + delete: parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: npm package name - in: path - name: package - schema: - type: string - - description: npm scope + - description: Organization slug in: path - name: scope + name: organization + required: true schema: type: string - - description: npm package name (scoped) + responses: + "200": + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Delete organization + tags: + - Organizations + get: + parameters: + - description: Organization slug in: path - name: name + name: organization + required: true schema: type: string responses: @@ -12083,36 +12113,53 @@ paths: content: application/json: schema: - additionalProperties: {} - type: object + $ref: '#/components/schemas/dtos.OrgDetailsDTO' description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy npm package metadata + summary: Get organization details tags: - - Dependency Firewall - /dependency-proxy/npm/{package}/-/{path}: - get: + - Organizations + patch: parameters: - - description: dependency proxy secret + - description: Organization slug in: path - name: secret - schema: - type: string - - description: npm package name - in: path - name: package - schema: - type: string - - description: npm scope - in: path - name: scope + name: organization + required: true schema: type: string - - description: npm package name (scoped) + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.OrgPatchRequest' + description: Request body + summary: body + description: Request body + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.OrgDetailsDTO' + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Update organization + tags: + - Organizations + /organizations/{organization}/compliance-postures: + get: + parameters: + - description: Organization slug in: path - name: name + name: organization + required: true schema: type: string responses: @@ -12120,93 +12167,142 @@ paths: content: application/json: schema: - type: file + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO' description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy npm tarball download + summary: List compliance postures paged tags: - - Dependency Firewall - /dependency-proxy/npm/{scope}/{name}: + - Compliance Postures + /organizations/{organization}/compliance-postures/{frameworkControlID}: get: parameters: - - description: dependency proxy secret + - description: Organization slug in: path - name: secret + name: organization + required: true schema: type: string - - description: npm package name + - description: Framework Control ID in: path - name: package + name: frameworkControlID + required: true schema: type: string - - description: npm scope + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Get compliance posture for a framework control + tags: + - Compliance Postures + post: + parameters: + - description: Organization slug in: path - name: scope + name: organization + required: true schema: type: string - - description: npm package name (scoped) + - description: Framework Control ID in: path - name: name + name: frameworkControlID + required: true schema: type: string + requestBody: + content: + application/json: + schema: + properties: + justification: + type: string + status: + type: string + title: body + type: object + description: Event data + required: true responses: "200": content: application/json: schema: - additionalProperties: {} - type: object + $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy npm package metadata + summary: Create a compliance posture event tags: - - Dependency Firewall - /dependency-proxy/npm/{scope}/{name}/-/{path}: - get: + - Compliance Postures + /organizations/{organization}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}/: + post: parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: npm package name + - description: Organization slug in: path - name: package + name: organization + required: true schema: type: string - - description: npm scope + - description: Framework control ID in: path - name: scope + name: frameworkControlID + required: true schema: type: string - - description: npm package name (scoped) + - description: Compliance component ID in: path - name: name + name: complianceComponentID + required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/controllers.statementPayload' + description: Request body + summary: body + description: Request body + required: true responses: - "200": + "201": content: application/json: schema: - type: file - description: OK + $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + description: Created security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy npm tarball download + summary: Create a compliance statement for a component tags: - - Dependency Firewall - /dependency-proxy/pypi/packages/{path}: - get: + - Compliance Components + /organizations/{organization}/compliance-postures/components/{statementID}/: + delete: parameters: - - description: dependency proxy secret + - description: Organization slug in: path - name: secret + name: organization + required: true + schema: + type: string + - description: Statement ID + in: path + name: statementID + required: true schema: type: string responses: @@ -12214,212 +12310,251 @@ paths: content: application/json: schema: - type: file + type: object description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy PyPI package download + summary: Delete a compliance statement tags: - - Dependency Firewall - /dependency-proxy/pypi/simple/{package}: - get: + - Compliance Components + put: parameters: - - description: dependency proxy secret + - description: Organization slug in: path - name: secret + name: organization + required: true schema: type: string - - description: PyPI package name + - description: Statement ID in: path - name: package + name: statementID required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/controllers.statementPayload' + description: Request body + summary: body + description: Request body + required: true responses: "200": content: application/json: schema: - type: string - description: HTML simple index + $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy PyPI simple index metadata + summary: Update a compliance statement tags: - - Dependency Firewall - /health: + - Compliance Components + /organizations/{organization}/compliance-postures/oscal: get: + parameters: + - description: Organization slug + in: path + name: organization + required: true + schema: + type: string responses: "200": content: application/json: schema: - properties: - status: - type: string type: object description: OK - "503": - content: - application/json: - schema: - properties: - error: - type: string - status: - type: string - type: object - description: Service Unavailable - summary: Liveness and readiness check + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Get OSCAL system security plan tags: - - System - /info: + - Compliance Postures + /organizations/{organization}/compliance-postures/stats: get: + parameters: + - description: Organization slug + in: path + name: organization + required: true + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.InfoResponse' + $ref: '#/components/schemas/dtos.CompliancePostureStatsDTO' description: OK - summary: Runtime, build and database diagnostics + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Get compliance posture stats tags: - - System - /instance-settings: - get: - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.InstanceSettingsDTO' - description: OK - summary: Get public instance settings - tags: - - Admin - /integrations/repositories: + - Compliance Postures + /organizations/{organization}/components: get: + parameters: + - description: Organization slug + in: path + name: organization + required: true + schema: + type: string + - description: Page number + in: query + name: page + schema: + type: integer + - description: Page size + in: query + name: pageSize + schema: + type: integer + - description: Search term + in: query + name: search + schema: + type: string responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.GitRepository' - type: array + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List repositories from integrations for the session + summary: Search component occurrences within an organization tags: - - Integrations - /lookup: + - Components + /organizations/{organization}/config-files/{config-file}: get: parameters: - - description: Provider name - in: query - name: provider + - description: Organization slug + in: path + name: organization required: true schema: type: string - - description: Repository ID - in: query - name: id + - description: Config file ID + in: path + name: config-file required: true schema: type: string responses: "200": content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/dtos.LookupResponse' - description: OK - summary: Lookup asset by provider + type: string + description: Config file content + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Get organization config file tags: - - Assets - /oauth2/gitlab/{integrationName}: - get: + - Organizations + put: parameters: - - description: Integration name + - description: Organization slug in: path - name: integrationName + name: organization + required: true + schema: + type: string + - description: Config file ID + in: path + name: config-file required: true schema: type: string + requestBody: + content: + text/plain: + schema: + title: body + type: string + description: Config file content + required: true responses: "200": - description: OK + content: + text/plain: + schema: + type: string + description: Updated config file content security: - CookieAuth: [] - summary: GitLab OAuth2 login + - PATAuth: [] + - BearerAuth: [] + summary: Update organization config file tags: - - Integrations - /oauth2/gitlab/callback/{integrationName}: + - Organizations + /organizations/{organization}/content-tree: get: parameters: - - description: Integration name + - description: Organization slug in: path - name: integrationName + name: organization required: true schema: type: string - responses: - "200": - description: OK - security: - - CookieAuth: [] - summary: GitLab OAuth2 callback - tags: - - Integrations - /organizations: - get: responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org' + $ref: '#/components/schemas/dtos.ProjectDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List organizations + summary: Get organization content tree tags: - Organizations - post: - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.OrgCreateRequest' - description: Request body - summary: body - description: Request body + /organizations/{organization}/csaf/openpgp: + get: + parameters: + - description: Organization slug + in: path + name: organization required: true + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Org' + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create organization + summary: Get CSAF OpenPGP keys HTML tags: - - Organizations - /organizations/{organization}: - delete: + - CSAF + /organizations/{organization}/csaf/openpgp/{file}: + get: parameters: - description: Organization slug in: path @@ -12427,16 +12562,27 @@ paths: required: true schema: type: string + - description: File name + in: path + name: file + required: true + schema: + type: string responses: "200": + content: + application/json: + schema: + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete organization + summary: Get CSAF OpenPGP key or hash file tags: - - Organizations + - CSAF + /organizations/{organization}/csaf/provider-metadata.json: get: parameters: - description: Organization slug @@ -12450,47 +12596,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.OrgDetailsDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get organization details + summary: Get CSAF provider metadata for organization tags: - - Organizations - patch: + - CSAF + /organizations/{organization}/dependency-proxy-urls/: + get: parameters: - - description: Organization slug + - description: organization slug in: path name: organization required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.OrgPatchRequest' - description: Request body - summary: body - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.OrgDetailsDTO' + additionalProperties: + type: string + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update organization + summary: Get organization dependency proxy URLs tags: - - Organizations - /organizations/{organization}/compliance-postures: + - Dependency Firewall + /organizations/{organization}/dependency-vulns: get: parameters: - description: Organization slug @@ -12499,21 +12639,26 @@ paths: required: true schema: type: string + - description: Search term + in: query + name: search + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List compliance postures paged + summary: List dependency vulnerabilities by organization tags: - - Compliance Postures - /organizations/{organization}/compliance-postures/{frameworkControlID}: + - Vulnerabilities + /organizations/{organization}/first-party-vulns: get: parameters: - description: Organization slug @@ -12522,10 +12667,9 @@ paths: required: true schema: type: string - - description: Framework Control ID - in: path - name: frameworkControlID - required: true + - description: Search term + in: query + name: search schema: type: string responses: @@ -12533,16 +12677,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get compliance posture for a framework control + summary: List first-party vulnerabilities by organization tags: - - Compliance Postures - post: + - Vulnerabilities + /organizations/{organization}/integrations/finish-installation/: + get: parameters: - description: Organization slug in: path @@ -12550,41 +12695,27 @@ paths: required: true schema: type: string - - description: Framework Control ID - in: path - name: frameworkControlID - required: true + - description: Third party installation id + in: query + name: installationId schema: type: string - requestBody: - content: - application/json: - schema: - properties: - justification: - type: string - status: - type: string - title: body - type: object - description: Event data - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a compliance posture event + summary: Finish a third-party integration installation tags: - - Compliance Postures - /organizations/{organization}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}/: - post: + - Integrations + /organizations/{organization}/integrations/gitlab/{gitlab_integration_id}/: + delete: parameters: - description: Organization slug in: path @@ -12592,71 +12723,24 @@ paths: required: true schema: type: string - - description: Framework control ID + - description: GitLab integration ID in: path - name: frameworkControlID - required: true - schema: - type: string - - description: Compliance component ID - in: path - name: complianceComponentID - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/controllers.statementPayload' - description: Request body - summary: body - description: Request body - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' - description: Created - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Create a compliance statement for a component - tags: - - Compliance Components - /organizations/{organization}/compliance-postures/components/{statementID}/: - delete: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Statement ID - in: path - name: statementID + name: gitlab_integration_id required: true schema: type: string responses: "200": - content: - application/json: - schema: - type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete a compliance statement + summary: Delete a GitLab integration access token tags: - - Compliance Components - put: + - Integrations + /organizations/{organization}/integrations/gitlab/test-and-save/: + post: parameters: - description: Organization slug in: path @@ -12664,37 +12748,37 @@ paths: required: true schema: type: string - - description: Statement ID - in: path - name: statementID - required: true - schema: - type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/controllers.statementPayload' - description: Request body - summary: body - description: Request body + properties: + name: + type: string + token: + type: string + url: + type: string + title: body + type: object + description: GitLab credentials required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + $ref: '#/components/schemas/dtos.GitlabIntegrationDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update a compliance statement + summary: Test and save GitLab integration credentials tags: - - Compliance Components - /organizations/{organization}/compliance-postures/oscal: - get: + - Integrations + /organizations/{organization}/integrations/jira/{jira_integration_id}/: + delete: parameters: - description: Organization slug in: path @@ -12702,22 +12786,24 @@ paths: required: true schema: type: string + - description: Jira integration ID + in: path + name: jira_integration_id + required: true + schema: + type: string responses: "200": - content: - application/json: - schema: - type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get OSCAL system security plan + summary: Delete a Jira integration access token tags: - - Compliance Postures - /organizations/{organization}/compliance-postures/stats: - get: + - Integrations + /organizations/{organization}/integrations/jira/test-and-save/: + post: parameters: - description: Organization slug in: path @@ -12725,21 +12811,38 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + properties: + name: + type: string + token: + type: string + url: + type: string + userEmail: + type: string + title: body + type: object + description: Jira credentials + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureStatsDTO' + $ref: '#/components/schemas/dtos.JiraIntegrationDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get compliance posture stats + summary: Test and save Jira integration credentials tags: - - Compliance Postures - /organizations/{organization}/components: + - Integrations + /organizations/{organization}/integrations/repositories: get: parameters: - description: Organization slug @@ -12748,37 +12851,24 @@ paths: required: true schema: type: string - - description: Page number - in: query - name: page - schema: - type: integer - - description: Page size - in: query - name: pageSize - schema: - type: integer - - description: Search term - in: query - name: search - schema: - type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO' + items: + $ref: '#/components/schemas/dtos.GitRepository' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Search component occurrences within an organization + summary: List repositories from integrations for an organization tags: - - Components - /organizations/{organization}/config-files/{config-file}: - get: + - Integrations + /organizations/{organization}/integrations/webhook/{id}: + delete: parameters: - description: Organization slug in: path @@ -12786,26 +12876,22 @@ paths: required: true schema: type: string - - description: Config file ID + - description: Webhook ID in: path - name: config-file + name: id required: true schema: type: string responses: "200": - content: - text/plain: - schema: - type: string - description: Config file content + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get organization config file + summary: Delete webhook integration (org) tags: - - Organizations + - Webhooks put: parameters: - description: Organization slug @@ -12814,36 +12900,37 @@ paths: required: true schema: type: string - - description: Config file ID + - description: Webhook ID in: path - name: config-file + name: id required: true schema: type: string requestBody: content: - text/plain: + application/json: schema: - title: body - type: string - description: Config file content + $ref: '#/components/schemas/dtos.WebhookUpdateRequestDTO' + description: Webhook data + summary: body + description: Webhook data required: true responses: "200": content: - text/plain: + application/json: schema: - type: string - description: Updated config file content + $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update organization config file + summary: Update webhook integration (org) tags: - - Organizations - /organizations/{organization}/content-tree: - get: + - Webhooks + /organizations/{organization}/integrations/webhook/test: + post: parameters: - description: Organization slug in: path @@ -12851,24 +12938,36 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.WebhookTestRequestDTO' + description: Test webhook data + summary: body + description: Test webhook data + required: true responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.ProjectDTO' - type: array + properties: + message: + type: string + payloadType: + type: string + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get organization content tree + summary: Test webhook integration (org) tags: - - Organizations - /organizations/{organization}/csaf/openpgp: - get: + - Webhooks + /organizations/{organization}/integrations/webhook/test-and-save: + post: parameters: - description: Organization slug in: path @@ -12876,22 +12975,31 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.WebhookCreateRequestDTO' + description: Webhook data + summary: body + description: Webhook data + required: true responses: "200": content: application/json: schema: - type: string + $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF OpenPGP keys HTML + summary: Create webhook integration (org) tags: - - CSAF - /organizations/{organization}/csaf/openpgp/{file}: - get: + - Webhooks + /organizations/{organization}/invitation/{ID}: + delete: parameters: - description: Organization slug in: path @@ -12899,27 +13007,23 @@ paths: required: true schema: type: string - - description: File name + - description: Invitation ID in: path - name: file + name: ID required: true schema: type: string responses: "200": - content: - application/json: - schema: - type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF OpenPGP key or hash file + summary: Revoke an organization invitation tags: - - CSAF - /organizations/{organization}/csaf/provider-metadata.json: + - Organizations + /organizations/{organization}/logs/: get: parameters: - description: Organization slug @@ -12928,24 +13032,49 @@ paths: required: true schema: type: string - responses: - "200": + - description: Page number + in: query + name: page + schema: + type: integer + - description: Page size + in: query + name: pageSize + schema: + type: integer + - description: Search term + in: query + name: search + schema: + type: string + - description: Sort query, e.g. sort[createdAt]=desc + in: query + name: sort + schema: + type: string + - description: Filter query, e.g. filterQuery[logs.log_level][is]=error + in: query + name: filterQuery + schema: + type: string + responses: + "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF provider metadata for organization + summary: List organization logs tags: - - CSAF - /organizations/{organization}/dependency-proxy-urls/: + - Logs + /organizations/{organization}/members: get: parameters: - - description: organization slug + - description: Organization slug in: path name: organization required: true @@ -12956,19 +13085,18 @@ paths: content: application/json: schema: - additionalProperties: - type: string - type: object + items: + type: object + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get organization dependency proxy URLs + summary: List organization members tags: - - Dependency Firewall - /organizations/{organization}/dependency-vulns: - get: + - Organizations + post: parameters: - description: Organization slug in: path @@ -12976,27 +13104,31 @@ paths: required: true schema: type: string - - description: Search term - in: query - name: search - schema: - type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.InviteRequest' + description: Request body + summary: body + description: Request body + required: true responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Invitation' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List dependency vulnerabilities by organization + summary: Invite member to organization tags: - - Vulnerabilities - /organizations/{organization}/first-party-vulns: - get: + - Organizations + /organizations/{organization}/members/{userID}: + delete: parameters: - description: Organization slug in: path @@ -13004,27 +13136,23 @@ paths: required: true schema: type: string - - description: Search term - in: query - name: search + - description: User ID + in: path + name: userID + required: true schema: type: string responses: "200": - content: - application/json: - schema: - type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List first-party vulnerabilities by organization + summary: Remove member from organization tags: - - Vulnerabilities - /organizations/{organization}/integrations/finish-installation/: - get: + - Organizations + put: parameters: - description: Organization slug in: path @@ -13032,27 +13160,33 @@ paths: required: true schema: type: string - - description: Third party installation id - in: query - name: installationId + - description: User ID + in: path + name: userID + required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.OrgChangeRoleRequest' + description: Request body + summary: body + description: Request body + required: true responses: "200": - content: - application/json: - schema: - type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Finish a third-party integration installation + summary: Change member role tags: - - Integrations - /organizations/{organization}/integrations/gitlab/{gitlab_integration_id}/: - delete: + - Organizations + /organizations/{organization}/metrics: + get: parameters: - description: Organization slug in: path @@ -13060,23 +13194,48 @@ paths: required: true schema: type: string - - description: GitLab integration ID + responses: + "200": + content: + application/json: + schema: + properties: + ownerId: + type: string + type: object + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Get organization metrics + tags: + - Organizations + /organizations/{organization}/pats: + get: + parameters: + - description: Organization slug in: path - name: gitlab_integration_id + name: organization required: true schema: type: string responses: "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/dtos.PATDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete a GitLab integration access token + summary: List organization access tokens tags: - - Integrations - /organizations/{organization}/integrations/gitlab/test-and-save/: + - Authentication post: parameters: - description: Organization slug @@ -13089,32 +13248,26 @@ paths: content: application/json: schema: - properties: - name: - type: string - token: - type: string - url: - type: string - title: body - type: object - description: GitLab credentials + $ref: '#/components/schemas/dtos.PatCreateRequest' + description: Request body + summary: body + description: Request body required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.GitlabIntegrationDTO' + $ref: '#/components/schemas/dtos.PATCreateResponseDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Test and save GitLab integration credentials + summary: Create organization access token tags: - - Integrations - /organizations/{organization}/integrations/jira/{jira_integration_id}/: + - Authentication + /organizations/{organization}/pats/{tokenID}: delete: parameters: - description: Organization slug @@ -13123,9 +13276,9 @@ paths: required: true schema: type: string - - description: Jira integration ID + - description: Token ID in: path - name: jira_integration_id + name: tokenID required: true schema: type: string @@ -13136,11 +13289,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete a Jira integration access token + summary: Delete organization access token tags: - - Integrations - /organizations/{organization}/integrations/jira/test-and-save/: - post: + - Authentication + /organizations/{organization}/policies: + get: parameters: - description: Organization slug in: path @@ -13148,39 +13301,23 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - properties: - name: - type: string - token: - type: string - url: - type: string - userEmail: - type: string - title: body - type: object - description: Jira credentials - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.JiraIntegrationDTO' + items: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Test and save Jira integration credentials + summary: List organization policies tags: - - Integrations - /organizations/{organization}/integrations/repositories: - get: + - Policies + post: parameters: - description: Organization slug in: path @@ -13188,23 +13325,30 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.PolicyDTO' + description: Request body + summary: body + description: Request body + required: true responses: - "200": + "201": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.GitRepository' - type: array - description: OK + $ref: '#/components/schemas/dtos.PolicyDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List repositories from integrations for an organization + summary: Create a policy tags: - - Integrations - /organizations/{organization}/integrations/webhook/{id}: + - Policies + /organizations/{organization}/policies/{policyID}: delete: parameters: - description: Organization slug @@ -13213,23 +13357,23 @@ paths: required: true schema: type: string - - description: Webhook ID + - description: Policy ID in: path - name: id + name: policyID required: true schema: type: string responses: - "200": - description: OK + "204": + description: No Content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete webhook integration (org) + summary: Delete a policy tags: - - Webhooks - put: + - Policies + get: parameters: - description: Organization slug in: path @@ -13237,37 +13381,27 @@ paths: required: true schema: type: string - - description: Webhook ID + - description: Policy ID in: path - name: id + name: policyID required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.WebhookUpdateRequestDTO' - description: Webhook data - summary: body - description: Webhook data - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update webhook integration (org) + summary: Get a policy tags: - - Webhooks - /organizations/{organization}/integrations/webhook/test: - post: + - Policies + put: parameters: - description: Organization slug in: path @@ -13275,40 +13409,9 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.WebhookTestRequestDTO' - description: Test webhook data - summary: body - description: Test webhook data - required: true - responses: - "200": - content: - application/json: - schema: - properties: - message: - type: string - payloadType: - type: string - type: object - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Test webhook integration (org) - tags: - - Webhooks - /organizations/{organization}/integrations/webhook/test-and-save: - post: - parameters: - - description: Organization slug + - description: Policy ID in: path - name: organization + name: policyID required: true schema: type: string @@ -13316,51 +13419,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.WebhookCreateRequestDTO' - description: Webhook data + $ref: '#/components/schemas/dtos.PolicyDTO' + description: Request body summary: body - description: Webhook data + description: Request body required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Create webhook integration (org) - tags: - - Webhooks - /organizations/{organization}/invitation/{ID}: - delete: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Invitation ID - in: path - name: ID - required: true - schema: - type: string - responses: - "200": + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Revoke an organization invitation + summary: Update a policy tags: - - Organizations - /organizations/{organization}/logs/: + - Policies + /organizations/{organization}/projects: get: parameters: - description: Organization slug @@ -13379,60 +13457,25 @@ paths: name: pageSize schema: type: integer - - description: Search term + - description: Search query in: query name: search schema: type: string - - description: Sort query, e.g. sort[createdAt]=desc - in: query - name: sort - schema: - type: string - - description: Filter query, e.g. filterQuery[logs.log_level][is]=error - in: query - name: filterQuery - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: List organization logs - tags: - - Logs - /organizations/{organization}/members: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string responses: "200": content: application/json: schema: - items: - type: object - type: array + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Project' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List organization members + summary: List projects tags: - - Organizations + - Projects post: parameters: - description: Organization slug @@ -13445,7 +13488,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.InviteRequest' + $ref: '#/components/schemas/dtos.ProjectCreateRequest' description: Request body summary: body description: Request body @@ -13455,16 +13498,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Invitation' + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Project' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Invite member to organization + summary: Create project tags: - - Organizations - /organizations/{organization}/members/{userID}: + - Projects + /organizations/{organization}/projects/{projectSlug}: delete: parameters: - description: Organization slug @@ -13473,9 +13516,9 @@ paths: required: true schema: type: string - - description: User ID + - description: Project slug in: path - name: userID + name: projectSlug required: true schema: type: string @@ -13486,10 +13529,10 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Remove member from organization + summary: Delete project tags: - - Organizations - put: + - Projects + get: parameters: - description: Organization slug in: path @@ -13497,33 +13540,27 @@ paths: required: true schema: type: string - - description: User ID + - description: Project slug in: path - name: userID + name: projectSlug required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.OrgChangeRoleRequest' - description: Request body - summary: body - description: Request body - required: true responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ProjectDetailsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Change member role + summary: Get project details tags: - - Organizations - /organizations/{organization}/metrics: - get: + - Projects + patch: parameters: - description: Organization slug in: path @@ -13531,24 +13568,36 @@ paths: required: true schema: type: string + - description: Project slug + in: path + name: projectSlug + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ProjectPatchRequest' + description: Request body + summary: body + description: Request body + required: true responses: "200": content: application/json: schema: - properties: - ownerId: - type: string - type: object + $ref: '#/components/schemas/dtos.ProjectDetailsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get organization metrics + summary: Update project tags: - - Organizations - /organizations/{organization}/pats: + - Projects + /organizations/{organization}/projects/{projectSlug}/assets: get: parameters: - description: Organization slug @@ -13557,22 +13606,28 @@ paths: required: true schema: type: string + - description: Project slug + in: path + name: projectSlug + required: true + schema: + type: string responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/dtos.PATDTO' + $ref: '#/components/schemas/dtos.AssetDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List organization access tokens + summary: List assets tags: - - Authentication + - Assets post: parameters: - description: Organization slug @@ -13581,11 +13636,17 @@ paths: required: true schema: type: string + - description: Project slug + in: path + name: projectSlug + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/dtos.PatCreateRequest' + $ref: '#/components/schemas/dtos.AssetCreateRequest' description: Request body summary: body description: Request body @@ -13595,16 +13656,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.PATCreateResponseDTO' + $ref: '#/components/schemas/dtos.AssetDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create organization access token + summary: Create asset tags: - - Authentication - /organizations/{organization}/pats/{tokenID}: + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}: delete: parameters: - description: Organization slug @@ -13613,9 +13674,15 @@ paths: required: true schema: type: string - - description: Token ID + - description: Project slug in: path - name: tokenID + name: projectSlug + required: true + schema: + type: string + - description: Asset slug + in: path + name: assetSlug required: true schema: type: string @@ -13626,10 +13693,9 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete organization access token + summary: Delete asset tags: - - Authentication - /organizations/{organization}/policies: + - Assets get: parameters: - description: Organization slug @@ -13638,23 +13704,33 @@ paths: required: true schema: type: string - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' - type: array + - description: Project slug + in: path + name: projectSlug + required: true + schema: + type: string + - description: Asset slug + in: path + name: assetSlug + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.AssetDetailsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List organization policies + summary: Get asset details tags: - - Policies - post: + - Assets + patch: parameters: - description: Organization slug in: path @@ -13662,31 +13738,43 @@ paths: required: true schema: type: string + - description: Project slug + in: path + name: projectSlug + required: true + schema: + type: string + - description: Asset slug + in: path + name: assetSlug + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/dtos.PolicyDTO' + $ref: '#/components/schemas/dtos.AssetPatchRequest' description: Request body summary: body description: Request body required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.PolicyDTO' - description: Created + $ref: '#/components/schemas/dtos.AssetDetailsWithSecretsDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a policy + summary: Update asset tags: - - Policies - /organizations/{organization}/policies/{policyID}: - delete: + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/badges/{badge}/: + get: parameters: - description: Organization slug in: path @@ -13694,22 +13782,35 @@ paths: required: true schema: type: string - - description: Policy ID + - description: Project slug in: path - name: policyID + name: projectSlug + required: true + schema: + type: string + - description: Asset slug + in: path + name: assetSlug + required: true + schema: + type: string + - description: Badge type + in: path + name: badge required: true schema: type: string responses: - "204": - description: No Content - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Delete a policy + "200": + content: + image/svg+xml: + schema: + type: string + description: SVG badge + summary: Get asset badge tags: - - Policies + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance: get: parameters: - description: Organization slug @@ -13718,9 +13819,15 @@ paths: required: true schema: type: string - - description: Policy ID + - description: Project slug in: path - name: policyID + name: projectSlug + required: true + schema: + type: string + - description: Asset slug + in: path + name: assetSlug required: true schema: type: string @@ -13729,16 +13836,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' + items: + $ref: '#/components/schemas/compliance.PolicyEvaluation' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get a policy + summary: Get asset compliance tags: - - Policies - put: + - Compliance + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance/{policy}: + get: parameters: - description: Organization slug in: path @@ -13746,36 +13856,39 @@ paths: required: true schema: type: string - - description: Policy ID + - description: Project slug in: path - name: policyID + name: projectSlug required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.PolicyDTO' - description: Request body - summary: body - description: Request body + - description: Asset slug + in: path + name: assetSlug + required: true + schema: + type: string + - description: Policy ID + in: path + name: policy required: true + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' + $ref: '#/components/schemas/compliance.PolicyEvaluation' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update a policy + summary: Get policy compliance details for an asset tags: - - Policies - /organizations/{organization}/projects: + - Compliance + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/components/licenses: get: parameters: - description: Organization slug @@ -13784,19 +13897,21 @@ paths: required: true schema: type: string - - description: Page number - in: query - name: page + - description: Project slug + in: path + name: projectSlug + required: true schema: - type: integer - - description: Page size - in: query - name: pageSize + type: string + - description: Asset slug + in: path + name: assetSlug + required: true schema: - type: integer - - description: Search query + type: string + - description: Artifact name in: query - name: search + name: artifact schema: type: string responses: @@ -13804,16 +13919,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Project' + items: + $ref: '#/components/schemas/controllers.licenseResponse' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List projects + summary: Get license distribution for an asset tags: - - Projects - post: + - Components + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/config-files/{config-file}: + get: parameters: - description: Organization slug in: path @@ -13821,31 +13939,39 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ProjectCreateRequest' - description: Request body - summary: body - description: Request body + - description: Project slug + in: path + name: projectSlug + required: true + schema: + type: string + - description: Asset slug + in: path + name: assetSlug + required: true + schema: + type: string + - description: Config file ID + in: path + name: config-file required: true + schema: + type: string responses: "200": content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Project' - description: OK + type: string + description: Config file content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create project + summary: Get asset config file tags: - - Projects - /organizations/{organization}/projects/{projectSlug}: - delete: + - Assets + put: parameters: - description: Organization slug in: path @@ -13859,16 +13985,41 @@ paths: required: true schema: type: string + - description: Asset slug + in: path + name: assetSlug + required: true + schema: + type: string + - description: Config file ID + in: path + name: config-file + required: true + schema: + type: string + requestBody: + content: + text/plain: + schema: + title: body + type: string + description: Config file content + required: true responses: "200": - description: OK + content: + text/plain: + schema: + type: string + description: Updated config file content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete project + summary: Update asset config file tags: - - Projects + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf: get: parameters: - description: Organization slug @@ -13883,21 +14034,28 @@ paths: required: true schema: type: string + - description: Asset slug + in: path + name: assetSlug + required: true + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ProjectDetailsDTO' + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get project details + summary: Get CSAF directory index HTML tags: - - Projects - patch: + - CSAF + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white: + get: parameters: - description: Organization slug in: path @@ -13911,30 +14069,27 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ProjectPatchRequest' - description: Request body - summary: body - description: Request body + - description: Asset slug + in: path + name: assetSlug required: true + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ProjectDetailsDTO' + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update project + summary: Get CSAF TLP white directory HTML tags: - - Projects - /organizations/{organization}/projects/{projectSlug}/assets: + - CSAF + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}: get: parameters: - description: Organization slug @@ -13949,61 +14104,34 @@ paths: required: true schema: type: string - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/dtos.AssetDTO' - type: array - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: List assets - tags: - - Assets - post: - parameters: - - description: Organization slug + - description: Asset slug in: path - name: organization + name: assetSlug required: true schema: type: string - - description: Project slug + - description: Year in: path - name: projectSlug + name: year required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.AssetCreateRequest' - description: Request body - summary: body - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.AssetDTO' + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create asset + summary: Get CSAF reports by year HTML tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}: - delete: + - CSAF + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}/{version}: + get: parameters: - description: Organization slug in: path @@ -14023,6 +14151,18 @@ paths: required: true schema: type: string + - description: Year + in: path + name: year + required: true + schema: + type: string + - description: Version filename + in: path + name: version + required: true + schema: + type: string responses: "200": description: OK @@ -14030,9 +14170,10 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete asset + summary: Get CSAF report tags: - - Assets + - CSAF + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/changes.csv: get: parameters: - description: Organization slug @@ -14058,16 +14199,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.AssetDetailsDTO' + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset details + summary: Get CSAF changes CSV tags: - - Assets - patch: + - CSAF + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/index.txt: + get: parameters: - description: Organization slug in: path @@ -14087,67 +14229,58 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.AssetPatchRequest' - description: Request body - summary: body - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.AssetDetailsWithSecretsDTO' + type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update asset + summary: Get CSAF index file tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/badges/{badge}/: + - CSAF + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/dependency-proxy-urls/: get: parameters: - - description: Organization slug + - description: organization slug in: path name: organization required: true schema: type: string - - description: Project slug + - description: project slug in: path name: projectSlug required: true schema: type: string - - description: Asset slug + - description: asset slug in: path name: assetSlug required: true schema: type: string - - description: Badge type - in: path - name: badge - required: true - schema: - type: string responses: "200": content: - image/svg+xml: + application/json: schema: - type: string - description: SVG badge - summary: Get asset badge + additionalProperties: + type: string + type: object + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Get asset dependency proxy URLs tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance: + - Dependency Firewall + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references: get: parameters: - description: Organization slug @@ -14174,18 +14307,17 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/compliance.PolicyEvaluation' + $ref: '#/components/schemas/dtos.ExternalReferenceDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset compliance + summary: List external references for an asset tags: - - Compliance - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/compliance/{policy}: - get: + - ExternalReferences + post: parameters: - description: Organization slug in: path @@ -14205,28 +14337,31 @@ paths: required: true schema: type: string - - description: Policy ID - in: path - name: policy + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.CreateExternalReferenceRequest' + description: Create request + summary: request + description: Create request required: true - schema: - type: string responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/compliance.PolicyEvaluation' - description: OK + $ref: '#/components/schemas/dtos.ExternalReferenceDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get policy compliance details for an asset + summary: Create an external reference tags: - - Compliance - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/components/licenses: - get: + - ExternalReferences + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/{url}: + delete: parameters: - description: Organization slug in: path @@ -14246,29 +14381,24 @@ paths: required: true schema: type: string - - description: Artifact name - in: query - name: artifact + - description: URL-encoded external reference URL + in: path + name: url + required: true schema: type: string responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/controllers.licenseResponse' - type: array - description: OK + "204": + description: No Content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get license distribution for an asset + summary: Delete an external reference by URL tags: - - Components - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/config-files/{config-file}: - get: + - ExternalReferences + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/sync: + post: parameters: - description: Organization slug in: path @@ -14288,27 +14418,18 @@ paths: required: true schema: type: string - - description: Config file ID - in: path - name: config-file - required: true - schema: - type: string responses: "200": - content: - text/plain: - schema: - type: string - description: Config file content + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset config file + summary: Sync external sources for all artifacts of an asset version tags: - - Assets - put: + - ExternalReferences + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/: + post: parameters: - description: Organization slug in: path @@ -14328,35 +14449,30 @@ paths: required: true schema: type: string - - description: Config file ID - in: path - name: config-file - required: true - schema: - type: string requestBody: content: - text/plain: + application/json: schema: - title: body - type: string - description: Config file content + $ref: '#/components/schemas/dtos.CreateInTotoLinkRequest' + description: Request body + summary: body + description: Request body required: true responses: "200": content: - text/plain: + application/json: schema: - type: string - description: Updated config file content + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.InTotoLink' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update asset config file + summary: Create an in-toto link tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf: + - In-toto + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/root.layout.json/: get: parameters: - description: Organization slug @@ -14382,17 +14498,17 @@ paths: content: application/json: schema: - type: string + type: file description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF directory index HTML + summary: Get the in-toto root layout tags: - - CSAF - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white: - get: + - In-toto + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/integrations/gitlab/autosetup/: + post: parameters: - description: Organization slug in: path @@ -14414,19 +14530,15 @@ paths: type: string responses: "200": - content: - application/json: - schema: - type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF TLP white directory HTML + summary: Auto-setup the GitLab integration for an asset tags: - - CSAF - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}: + - Integrations + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/logs/: get: parameters: - description: Organization slug @@ -14447,10 +14559,29 @@ paths: required: true schema: type: string - - description: Year - in: path - name: year - required: true + - description: Page number + in: query + name: page + schema: + type: integer + - description: Page size + in: query + name: pageSize + schema: + type: integer + - description: Search term + in: query + name: search + schema: + type: string + - description: Sort query, e.g. sort[createdAt]=desc + in: query + name: sort + schema: + type: string + - description: Filter query, e.g. filterQuery[logs.log_level][is]=error + in: query + name: filterQuery schema: type: string responses: @@ -14458,16 +14589,16 @@ paths: content: application/json: schema: - type: string + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF reports by year HTML + summary: List asset logs tags: - - CSAF - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}/{version}: + - Logs + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/: get: parameters: - description: Organization slug @@ -14488,18 +14619,45 @@ paths: required: true schema: type: string - - description: Year + responses: + "200": + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: List asset members + tags: + - Assets + post: + parameters: + - description: Organization slug in: path - name: year + name: organization required: true schema: type: string - - description: Version filename + - description: Project slug in: path - name: version + name: projectSlug + required: true + schema: + type: string + - description: Asset slug + in: path + name: assetSlug required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.AssetInviteToAssetRequest' + description: Request body + summary: body + description: Request body + required: true responses: "200": description: OK @@ -14507,11 +14665,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF report + summary: Invite members to asset tags: - - CSAF - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/changes.csv: - get: + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/{userID}/: + delete: parameters: - description: Organization slug in: path @@ -14531,22 +14689,23 @@ paths: required: true schema: type: string + - description: User ID + in: path + name: userID + required: true + schema: + type: string responses: "200": - content: - application/json: - schema: - type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF changes CSV + summary: Remove member from asset tags: - - CSAF - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/index.txt: - get: + - Assets + put: parameters: - description: Organization slug in: path @@ -14566,36 +14725,47 @@ paths: required: true schema: type: string + - description: User ID + in: path + name: userID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.AssetChangeRoleRequest' + description: Request body + summary: body + description: Request body + required: true responses: "200": - content: - application/json: - schema: - type: string description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get CSAF index file + summary: Change role of asset member tags: - - CSAF - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/dependency-proxy-urls/: + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/number-of-exploits/: get: parameters: - - description: organization slug + - description: Organization slug in: path name: organization required: true schema: type: string - - description: project slug + - description: Project slug in: path name: projectSlug required: true schema: type: string - - description: asset slug + - description: Asset slug in: path name: assetSlug required: true @@ -14606,18 +14776,18 @@ paths: content: application/json: schema: - additionalProperties: - type: string - type: object + items: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.CVE' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset dependency proxy URLs + summary: Get CVEs with known exploits for an asset tags: - - Dependency Firewall - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references: + - Statistics + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats: get: parameters: - description: Organization slug @@ -14644,16 +14814,16 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/dtos.ExternalReferenceDTO' + $ref: '#/components/schemas/dtos.PATDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List external references for an asset + summary: List asset access tokens tags: - - ExternalReferences + - Authentication post: parameters: - description: Organization slug @@ -14678,26 +14848,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.CreateExternalReferenceRequest' - description: Create request - summary: request - description: Create request + $ref: '#/components/schemas/dtos.PatCreateRequest' + description: Request body + summary: body + description: Request body required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ExternalReferenceDTO' - description: Created + $ref: '#/components/schemas/dtos.PATCreateResponseDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create an external reference + summary: Create asset access token tags: - - ExternalReferences - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/{url}: + - Authentication + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats/{tokenID}: delete: parameters: - description: Organization slug @@ -14718,23 +14888,23 @@ paths: required: true schema: type: string - - description: URL-encoded external reference URL + - description: Token ID in: path - name: url + name: tokenID required: true schema: type: string responses: - "204": - description: No Content + "200": + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete an external reference by URL + summary: Delete asset access token tags: - - ExternalReferences - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/external-references/sync: + - Authentication + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pipeline-trigger/: post: parameters: - description: Organization slug @@ -14762,11 +14932,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Sync external sources for all artifacts of an asset version + summary: Trigger asset daemon pipeline tags: - - ExternalReferences - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/: - post: + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/: + get: parameters: - description: Organization slug in: path @@ -14786,31 +14956,23 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.CreateInTotoLinkRequest' - description: Request body - summary: body - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.InTotoLink' + items: + $ref: '#/components/schemas/dtos.AssetVersionDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create an in-toto link + summary: List asset versions tags: - - In-toto - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/in-toto/root.layout.json/: - get: + - Asset Versions + post: parameters: - description: Organization slug in: path @@ -14830,22 +14992,37 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + properties: + defaultBranch: + type: boolean + name: + type: string + tag: + type: boolean + title: body + type: object + description: Request body + required: true responses: - "200": + "201": content: application/json: schema: - type: file - description: OK + $ref: '#/components/schemas/dtos.AssetVersionDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get the in-toto root layout + summary: Create asset version tags: - - In-toto - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/integrations/gitlab/autosetup/: - post: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/: + delete: parameters: - description: Organization slug in: path @@ -14865,6 +15042,12 @@ paths: required: true schema: type: string + - description: Asset version slug + in: path + name: assetVersionSlug + required: true + schema: + type: string responses: "200": description: OK @@ -14872,10 +15055,9 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Auto-setup the GitLab integration for an asset + summary: Delete asset version tags: - - Integrations - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/logs/: + - Asset Versions get: parameters: - description: Organization slug @@ -14896,29 +15078,10 @@ paths: required: true schema: type: string - - description: Page number - in: query - name: page - schema: - type: integer - - description: Page size - in: query - name: pageSize - schema: - type: integer - - description: Search term - in: query - name: search - schema: - type: string - - description: Sort query, e.g. sort[createdAt]=desc - in: query - name: sort - schema: - type: string - - description: Filter query, e.g. filterQuery[logs.log_level][is]=error - in: query - name: filterQuery + - description: Asset version slug + in: path + name: assetVersionSlug + required: true schema: type: string responses: @@ -14926,16 +15089,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO' + $ref: '#/components/schemas/dtos.AssetVersionDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List asset logs + summary: Get asset version details tags: - - Logs - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/: get: parameters: - description: Organization slug @@ -14956,16 +15119,26 @@ paths: required: true schema: type: string + - description: Asset version slug + in: path + name: assetVersionSlug + required: true + schema: + type: string responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Advisory' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List asset members + summary: List advisories tags: - - Assets + - Advisories post: parameters: - description: Organization slug @@ -14986,11 +15159,17 @@ paths: required: true schema: type: string + - description: Asset version slug + in: path + name: assetVersionSlug + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/dtos.AssetInviteToAssetRequest' + $ref: '#/components/schemas/dtos.AdvisoryCreate' description: Request body summary: body description: Request body @@ -15002,10 +15181,10 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Invite members to asset + summary: Create advisory tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/members/{userID}/: + - Advisories + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/: delete: parameters: - description: Organization slug @@ -15026,9 +15205,15 @@ paths: required: true schema: type: string - - description: User ID + - description: Asset version slug in: path - name: userID + name: assetVersionSlug + required: true + schema: + type: string + - description: Advisory ID + in: path + name: id required: true schema: type: string @@ -15039,10 +15224,10 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Remove member from asset + summary: Delete advisory tags: - - Assets - put: + - Advisories + get: parameters: - description: Organization slug in: path @@ -15062,33 +15247,33 @@ paths: required: true schema: type: string - - description: User ID + - description: Asset version slug in: path - name: userID + name: assetVersionSlug required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.AssetChangeRoleRequest' - description: Request body - summary: body - description: Request body + - description: Advisory ID + in: path + name: id required: true + schema: + type: string responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Advisory' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Change role of asset member + summary: Get advisory details tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/number-of-exploits/: - get: + - Advisories + patch: parameters: - description: Organization slug in: path @@ -15108,59 +15293,38 @@ paths: required: true schema: type: string - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.CVE' - type: array - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get CVEs with known exploits for an asset - tags: - - Statistics - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats: - get: - parameters: - - description: Organization slug + - description: Asset version slug in: path - name: organization + name: assetVersionSlug required: true schema: type: string - - description: Project slug + - description: Advisory ID in: path - name: projectSlug + name: id required: true schema: type: string - - description: Asset slug - in: path - name: assetSlug + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.AdvisoryUpdate' + description: Request body + summary: body + description: Request body required: true - schema: - type: string responses: "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/dtos.PATDTO' - type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List asset access tokens + summary: Update advisory tags: - - Authentication + - Advisories + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/events/: post: parameters: - description: Organization slug @@ -15181,31 +15345,39 @@ paths: required: true schema: type: string + - description: Asset version slug + in: path + name: assetVersionSlug + required: true + schema: + type: string + - description: Advisory ID + in: path + name: id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/dtos.PatCreateRequest' - description: Request body - summary: body - description: Request body + $ref: '#/components/schemas/dtos.CreateEventRequest' + description: Event + summary: event + description: Event required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.PATCreateResponseDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create asset access token + summary: Create advisory event tags: - - Authentication - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pats/{tokenID}: - delete: + - Advisories + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/affected-components/: + get: parameters: - description: Organization slug in: path @@ -15225,24 +15397,35 @@ paths: required: true schema: type: string - - description: Token ID + - description: Asset version slug in: path - name: tokenID + name: assetVersionSlug required: true schema: type: string + - description: Artifact name + in: query + name: artifactName + schema: + type: string responses: "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/dtos.DependencyVulnDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete asset access token + summary: Get affected components and dependency vulnerabilities tags: - - Authentication - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/pipeline-trigger/: - post: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifact-root-nodes/: + get: parameters: - description: Organization slug in: path @@ -15262,17 +15445,27 @@ paths: required: true schema: type: string + - description: Asset version slug + in: path + name: assetVersionSlug + required: true + schema: + type: string responses: "200": + content: + application/json: + schema: + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Trigger asset daemon pipeline + summary: Get information sources of the root nodes for each artifact tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/: get: parameters: - description: Organization slug @@ -15293,20 +15486,26 @@ paths: required: true schema: type: string + - description: Asset version slug + in: path + name: assetVersionSlug + required: true + schema: + type: string responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/dtos.AssetVersionDTO' + $ref: '#/components/schemas/dtos.ArtifactDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List asset versions + summary: List artifacts of an asset version tags: - Asset Versions post: @@ -15329,36 +15528,36 @@ paths: required: true schema: type: string + - description: Asset version slug + in: path + name: assetVersionSlug + required: true + schema: + type: string requestBody: content: application/json: schema: - properties: - defaultBranch: - type: boolean - name: - type: string - tag: - type: boolean - title: body - type: object - description: Request body - required: true + $ref: '#/components/schemas/controllers.ArtifactRequest' + description: Artifact data + summary: body + description: Artifact data + required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/dtos.AssetVersionDTO' + $ref: '#/components/schemas/dtos.ArtifactDTO' description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create asset version + summary: Create artifact tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/: + - Artifacts + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/: delete: parameters: - description: Organization slug @@ -15385,6 +15584,12 @@ paths: required: true schema: type: string + - description: Artifact name + in: path + name: artifactName + required: true + schema: + type: string responses: "200": description: OK @@ -15392,10 +15597,10 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete asset version + summary: Delete artifact tags: - - Asset Versions - get: + - Artifacts + put: parameters: - description: Organization slug in: path @@ -15421,22 +15626,37 @@ paths: required: true schema: type: string + - description: Artifact name + in: path + name: artifactName + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/controllers.ArtifactRequest' + description: Artifact data + summary: body + description: Artifact data + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.AssetVersionDTO' + $ref: '#/components/schemas/controllers.ArtifactUpdateResponse' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset version details + summary: Update artifact tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/: - get: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge} + : get: parameters: - description: Organization slug in: path @@ -15456,27 +15676,36 @@ paths: required: true schema: type: string - - description: Asset version slug + - description: Badge type in: path - name: assetVersionSlug + name: badge required: true schema: type: string + responses: + "200": + content: + image/svg+xml: + schema: + type: string + description: SVG badge + summary: Get asset badge + tags: + - Assets + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json/ + : get: responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-github_com_l3montree-dev_devguard_database_models_Advisory' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: List advisories + type: object + description: CSAF advisory in JSON format + summary: Get an aggregated CSAF VEX for all of the artifact's vulnerabilities tags: - - Advisories - post: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json/ + : get: parameters: - description: Organization slug in: path @@ -15502,27 +15731,28 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.AdvisoryCreate' - description: Request body - summary: body - description: Request body + - description: Artifact name + in: path + name: artifactName required: true + schema: + type: string responses: "200": - description: OK + content: + application/json: + schema: + type: object + description: OpenVEX document in JSON format security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create advisory + summary: Get VEX in OpenVEX JSON format tags: - - Advisories - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/: - delete: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json/ + : get: parameters: - description: Organization slug in: path @@ -15548,23 +15778,28 @@ paths: required: true schema: type: string - - description: Advisory ID + - description: Artifact name in: path - name: id + name: artifactName required: true schema: type: string responses: "200": - description: OK + content: + application/json: + schema: + type: object + description: CycloneDX BOM in JSON format security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete advisory + summary: Get SBOM in JSON format tags: - - Advisories - get: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.pdf/ + : get: parameters: - description: Organization slug in: path @@ -15590,27 +15825,28 @@ paths: required: true schema: type: string - - description: Advisory ID + - description: Artifact name in: path - name: id + name: artifactName required: true schema: type: string responses: "200": content: - application/json: + application/pdf: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Advisory' - description: OK + type: string + description: SBOM as PDF security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get advisory details + summary: Get SBOM as PDF tags: - - Advisories - patch: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.xml/ + : get: parameters: - description: Organization slug in: path @@ -15636,33 +15872,28 @@ paths: required: true schema: type: string - - description: Advisory ID + - description: Artifact name in: path - name: id + name: artifactName required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.AdvisoryUpdate' - description: Request body - summary: body - description: Request body - required: true responses: "200": - description: OK + content: + application/xml: + schema: + type: string + description: CycloneDX BOM in XML format security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update advisory + summary: Get SBOM in XML format tags: - - Advisories - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/advisory/{id}/events/: - post: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sync-external-sources + : post: parameters: - description: Organization slug in: path @@ -15688,21 +15919,12 @@ paths: required: true schema: type: string - - description: Advisory ID + - description: Artifact name in: path - name: id + name: artifactName required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.CreateEventRequest' - description: Event - summary: event - description: Event - required: true responses: "200": description: OK @@ -15710,11 +15932,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create advisory event + summary: Sync external sources for a single artifact tags: - - Advisories - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/affected-components/: - get: + - ExternalReferences + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json/ + : get: parameters: - description: Organization slug in: path @@ -15741,8 +15963,9 @@ paths: schema: type: string - description: Artifact name - in: query + in: path name: artifactName + required: true schema: type: string responses: @@ -15750,19 +15973,17 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.DependencyVulnDTO' - type: array - description: OK + type: object + description: CycloneDX VEX in JSON format security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get affected components and dependency vulnerabilities + summary: Get VEX in JSON format tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifact-root-nodes/: - get: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.xml/ + : get: parameters: - description: Organization slug in: path @@ -15788,22 +16009,28 @@ paths: required: true schema: type: string + - description: Artifact name + in: path + name: artifactName + required: true + schema: + type: string responses: "200": content: - application/json: + application/xml: schema: - type: object - description: OK + type: string + description: CycloneDX VEX in XML format security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get information sources of the root nodes for each artifact + summary: Get VEX in XML format tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/: - get: + - Artifacts + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vulnerability-report.pdf/ + : get: parameters: - description: Organization slug in: path @@ -15829,23 +16056,28 @@ paths: required: true schema: type: string + - description: Artifact name + in: path + name: artifactName + required: true + schema: + type: string responses: "200": content: - application/json: + application/pdf: schema: - items: - $ref: '#/components/schemas/dtos.ArtifactDTO' - type: array - description: OK + type: string + description: Vulnerability report as PDF security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List artifacts of an asset version + summary: Get vulnerability report as PDF tags: - - Asset Versions - post: + - Artifacts + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/attestations: + get: parameters: - description: Organization slug in: path @@ -15871,31 +16103,24 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/controllers.ArtifactRequest' - description: Artifact data - summary: body - description: Artifact data - required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ArtifactDTO' - description: Created + items: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Attestation' + type: array + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create artifact + summary: List attestations tags: - - Artifacts - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/: - delete: + - Attestations + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance: + get: parameters: - description: Organization slug in: path @@ -15921,23 +16146,24 @@ paths: required: true schema: type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string responses: "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/compliance.PolicyEvaluation' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete artifact + summary: Get asset version compliance tags: - - Artifacts - put: + - Compliance + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures: + get: parameters: - description: Organization slug in: path @@ -15963,36 +16189,21 @@ paths: required: true schema: type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/controllers.ArtifactRequest' - description: Artifact data - summary: body - description: Artifact data - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/controllers.ArtifactUpdateResponse' + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update artifact + summary: List compliance postures paged tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge} + - Compliance Postures + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID} : get: parameters: - description: Organization slug @@ -16013,36 +16224,33 @@ paths: required: true schema: type: string - - description: Badge type + - description: Asset version slug in: path - name: badge + name: assetVersionSlug + required: true + schema: + type: string + - description: Framework Control ID + in: path + name: frameworkControlID required: true schema: type: string - responses: - "200": - content: - image/svg+xml: - schema: - type: string - description: SVG badge - summary: Get asset badge - tags: - - Assets - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json/ - : get: responses: "200": content: application/json: schema: - type: object - description: CSAF advisory in JSON format - summary: Get an aggregated CSAF VEX for all of the artifact's vulnerabilities + $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: Get compliance posture for a framework control tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json/ - : get: + - Compliance Postures + post: parameters: - description: Organization slug in: path @@ -16068,28 +16276,41 @@ paths: required: true schema: type: string - - description: Artifact name + - description: Framework Control ID in: path - name: artifactName + name: frameworkControlID required: true schema: type: string + requestBody: + content: + application/json: + schema: + properties: + justification: + type: string + status: + type: string + title: body + type: object + description: Event data + required: true responses: "200": content: application/json: schema: - type: object - description: OpenVEX document in JSON format + $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get VEX in OpenVEX JSON format + summary: Create a compliance posture event tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json/ - : get: + - Compliance Postures + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID} + : post: parameters: - description: Organization slug in: path @@ -16115,28 +16336,43 @@ paths: required: true schema: type: string - - description: Artifact name + - description: Framework control ID in: path - name: artifactName + name: frameworkControlID + required: true + schema: + type: string + - description: Compliance component ID + in: path + name: complianceComponentID required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/controllers.statementPayload' + description: Request body + summary: body + description: Request body + required: true responses: - "200": + "201": content: application/json: schema: - type: object - description: CycloneDX BOM in JSON format + $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get SBOM in JSON format + summary: Create a compliance statement for a component tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.pdf/ - : get: + - Compliance Components + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/components/{statementID} + : delete: parameters: - description: Organization slug in: path @@ -16162,28 +16398,27 @@ paths: required: true schema: type: string - - description: Artifact name + - description: Statement ID in: path - name: artifactName + name: statementID required: true schema: type: string responses: "200": content: - application/pdf: + application/json: schema: - type: string - description: SBOM as PDF + type: object + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get SBOM as PDF + summary: Delete a compliance statement tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.xml/ - : get: + - Compliance Components + put: parameters: - description: Organization slug in: path @@ -16209,28 +16444,37 @@ paths: required: true schema: type: string - - description: Artifact name + - description: Statement ID in: path - name: artifactName + name: statementID required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/controllers.statementPayload' + description: Request body + summary: body + description: Request body + required: true responses: "200": content: - application/xml: + application/json: schema: - type: string - description: CycloneDX BOM in XML format + $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get SBOM in XML format + summary: Update a compliance statement tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sync-external-sources - : post: + - Compliance Components + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/oscal: + get: parameters: - description: Organization slug in: path @@ -16256,24 +16500,22 @@ paths: required: true schema: type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string responses: "200": + content: + application/json: + schema: + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Sync external sources for a single artifact + summary: Get OSCAL system security plan tags: - - ExternalReferences - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json/ - : get: + - Compliance Postures + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/stats: + get: parameters: - description: Organization slug in: path @@ -16299,28 +16541,22 @@ paths: required: true schema: type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string responses: "200": content: application/json: schema: - type: object - description: CycloneDX VEX in JSON format + $ref: '#/components/schemas/dtos.CompliancePostureStatsDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get VEX in JSON format + summary: Get compliance posture stats tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.xml/ - : get: + - Compliance Postures + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance/{policy}: + get: parameters: - description: Organization slug in: path @@ -16346,28 +16582,28 @@ paths: required: true schema: type: string - - description: Artifact name + - description: Policy ID in: path - name: artifactName + name: policy required: true schema: type: string responses: "200": content: - application/xml: + application/json: schema: - type: string - description: CycloneDX VEX in XML format + $ref: '#/components/schemas/compliance.PolicyEvaluation' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get VEX in XML format + summary: Get policy compliance details for an asset version tags: - - Artifacts - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vulnerability-report.pdf/ - : get: + - Compliance + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components: + get: parameters: - description: Organization slug in: path @@ -16393,27 +16629,21 @@ paths: required: true schema: type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string responses: "200": content: - application/pdf: + application/json: schema: - type: string - description: Vulnerability report as PDF + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentDependencyDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get vulnerability report as PDF + summary: List components paged tags: - - Artifacts - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/attestations: + - Components + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses: get: parameters: - description: Organization slug @@ -16440,24 +16670,29 @@ paths: required: true schema: type: string + - description: Artifact name + in: query + name: artifact + schema: + type: string responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Attestation' + $ref: '#/components/schemas/controllers.licenseResponse' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List attestations + summary: Get license distribution for an asset version tags: - - Attestations - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance: - get: + - Components + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses/refresh/: + post: parameters: - description: Organization slug in: path @@ -16483,23 +16718,26 @@ paths: required: true schema: type: string + - description: Artifact name + in: query + name: artifactName + schema: + type: string responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/compliance.PolicyEvaluation' - type: array + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset version compliance + summary: Refetch license information for all components tags: - - Compliance - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-graph/: get: parameters: - description: Organization slug @@ -16526,22 +16764,32 @@ paths: required: true schema: type: string + - description: Artifact name + in: query + name: artifactName + schema: + type: string + - description: Info source origin + in: query + name: origin + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO' + $ref: '#/components/schemas/transformer.MinimalTree' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List compliance postures paged + summary: Get minimal dependency graph tree tags: - - Compliance Postures - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID} - : get: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns: + get: parameters: - description: Organization slug in: path @@ -16567,10 +16815,14 @@ paths: required: true schema: type: string - - description: Framework Control ID - in: path - name: frameworkControlID - required: true + - description: Flat list flag + in: query + name: flat + schema: + type: string + - description: Search term + in: query + name: search schema: type: string responses: @@ -16578,16 +16830,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get compliance posture for a framework control + summary: List dependency vulnerabilities tags: - - Compliance Postures - post: + - Vulnerabilities + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID} + : get: parameters: - description: Organization slug in: path @@ -16613,41 +16866,27 @@ paths: required: true schema: type: string - - description: Framework Control ID + - description: Vulnerability ID in: path - name: frameworkControlID + name: dependencyVulnID required: true schema: type: string - requestBody: - content: - application/json: - schema: - properties: - justification: - type: string - status: - type: string - title: body - type: object - description: Event data - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + $ref: '#/components/schemas/dtos.DetailedDependencyVulnWithRelationsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a compliance posture event + summary: Get dependency vulnerability details tags: - - Compliance Postures - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID} - : post: + - Vulnerabilities + post: parameters: - description: Organization slug in: path @@ -16673,15 +16912,9 @@ paths: required: true schema: type: string - - description: Framework control ID - in: path - name: frameworkControlID - required: true - schema: - type: string - - description: Compliance component ID + - description: Vulnerability ID in: path - name: complianceComponentID + name: dependencyVulnID required: true schema: type: string @@ -16689,27 +16922,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/controllers.statementPayload' + $ref: '#/components/schemas/dtos.CreateEventRequest' description: Request body summary: body description: Request body required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' - description: Created + $ref: '#/components/schemas/dtos.DetailedDependencyVulnDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a compliance statement for a component + summary: Create vulnerability event tags: - - Compliance Components - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/components/{statementID} - : delete: + - Vulnerabilities + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/events + : get: parameters: - description: Organization slug in: path @@ -16735,9 +16968,9 @@ paths: required: true schema: type: string - - description: Statement ID + - description: Dependency vulnerability ID in: path - name: statementID + name: dependencyVulnID required: true schema: type: string @@ -16746,16 +16979,19 @@ paths: content: application/json: schema: - type: object + items: + $ref: '#/components/schemas/dtos.VulnEventDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete a compliance statement + summary: List events for a vulnerability tags: - - Compliance Components - put: + - Vulnerability Events + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/hints + : get: parameters: - description: Organization slug in: path @@ -16781,37 +17017,28 @@ paths: required: true schema: type: string - - description: Statement ID + - description: Vulnerability ID in: path - name: statementID + name: dependencyVulnID required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/controllers.statementPayload' - description: Request body - summary: body - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update a compliance statement + summary: Get hints for a dependency vulnerability tags: - - Compliance Components - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/oscal: - get: + - Vulnerabilities + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/mitigate + : post: parameters: - description: Organization slug in: path @@ -16837,22 +17064,39 @@ paths: required: true schema: type: string + - description: Vulnerability ID + in: path + name: dependencyVulnID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + comment: + type: string + title: body + type: object + description: Request body + required: true responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.DetailedDependencyVulnDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get OSCAL system security plan + summary: Mitigate a dependency vulnerability tags: - - Compliance Postures - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance-postures/stats: - get: + - Vulnerabilities + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/batch: + post: parameters: - description: Organization slug in: path @@ -16878,22 +17122,33 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.BatchDependencyVulnStatus' + description: Request body + summary: body + description: Request body + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureStatsDTO' + items: + $ref: '#/components/schemas/dtos.DetailedDependencyVulnDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get compliance posture stats + summary: Batch create vulnerability events tags: - - Compliance Postures - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/compliance/{policy}: - get: + - Vulnerabilities + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/sync: + post: parameters: - description: Organization slug in: path @@ -16919,27 +17174,29 @@ paths: required: true schema: type: string - - description: Policy ID - in: path - name: policy + requestBody: + content: + text/plain: + schema: + title: body + type: object + description: Request body required: true - schema: - type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/compliance.PolicyEvaluation' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get policy compliance details for an asset version + summary: Sync dependency vulnerabilities with third party integrations tags: - - Compliance - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components: + - Vulnerabilities + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events: get: parameters: - description: Organization slug @@ -16966,22 +17223,32 @@ paths: required: true schema: type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentDependencyDTO' - description: OK - security: - - CookieAuth: [] + - description: Page number + in: query + name: page + schema: + type: integer + - description: Page size + in: query + name: pageSize + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_VulnEventDTO' + description: OK + security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List components paged + summary: List events for an asset version tags: - - Components - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses: - get: + - Vulnerability Events + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events/{eventID}: + delete: parameters: - description: Organization slug in: path @@ -17007,29 +17274,24 @@ paths: required: true schema: type: string - - description: Artifact name - in: query - name: artifact + - description: Event ID + in: path + name: eventID + required: true schema: type: string responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/controllers.licenseResponse' - type: array - description: OK + "204": + description: No Content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get license distribution for an asset version + summary: Delete an event tags: - - Components - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/components/licenses/refresh/: - post: + - Vulnerability Events + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns: + get: parameters: - description: Organization slug in: path @@ -17055,9 +17317,9 @@ paths: required: true schema: type: string - - description: Artifact name + - description: Search term in: query - name: artifactName + name: search schema: type: string responses: @@ -17071,11 +17333,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Refetch license information for all components + summary: List first-party vulnerabilities by asset version tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-graph/: - get: + - Vulnerabilities + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID} + : get: parameters: - description: Organization slug in: path @@ -17101,14 +17363,10 @@ paths: required: true schema: type: string - - description: Artifact name - in: query - name: artifactName - schema: - type: string - - description: Info source origin - in: query - name: origin + - description: Vulnerability ID + in: path + name: firstPartyVulnID + required: true schema: type: string responses: @@ -17116,17 +17374,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/transformer.MinimalTree' + $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get minimal dependency graph tree + summary: Get first-party vulnerability details tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns: - get: + - Vulnerabilities + post: parameters: - description: Organization slug in: path @@ -17152,31 +17409,36 @@ paths: required: true schema: type: string - - description: Flat list flag - in: query - name: flat - schema: - type: string - - description: Search term - in: query - name: search + - description: Vulnerability ID + in: path + name: firstPartyVulnID + required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.FirstPartyVulnStatus' + description: Event data + summary: body + description: Event data + required: true responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List dependency vulnerabilities + summary: Create first-party vulnerability event tags: - Vulnerabilities - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID} + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/events : get: parameters: - description: Organization slug @@ -17203,7 +17465,7 @@ paths: required: true schema: type: string - - description: Vulnerability ID + - description: Dependency vulnerability ID in: path name: dependencyVulnID required: true @@ -17214,16 +17476,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedDependencyVulnWithRelationsDTO' + items: + $ref: '#/components/schemas/dtos.VulnEventDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get dependency vulnerability details + summary: List events for a vulnerability tags: - - Vulnerabilities - post: + - Vulnerability Events + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/mitigate + : post: parameters: - description: Organization slug in: path @@ -17251,7 +17516,7 @@ paths: type: string - description: Vulnerability ID in: path - name: dependencyVulnID + name: firstPartyVulnID required: true schema: type: string @@ -17259,9 +17524,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.CreateEventRequest' - description: Request body - summary: body + properties: + justification: + type: string + title: body + type: object description: Request body required: true responses: @@ -17269,17 +17536,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedDependencyVulnDTO' + $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create vulnerability event + summary: Mitigate a first-party vulnerability tags: - Vulnerabilities - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/events - : get: + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/batch: + post: parameters: - description: Organization slug in: path @@ -17305,30 +17572,33 @@ paths: required: true schema: type: string - - description: Dependency vulnerability ID - in: path - name: dependencyVulnID + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.BatchFirstPartyVulnStatus' + description: Request body + summary: body + description: Request body required: true - schema: - type: string responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/dtos.VulnEventDTO' + $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List events for a vulnerability + summary: Batch update first-party vulnerability states tags: - - Vulnerability Events - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/hints - : get: + - Vulnerabilities + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/in-toto/{supplyChainID}/: + get: parameters: - description: Organization slug in: path @@ -17354,9 +17624,9 @@ paths: required: true schema: type: string - - description: Vulnerability ID + - description: Supply chain ID in: path - name: dependencyVulnID + name: supplyChainID required: true schema: type: string @@ -17365,17 +17635,17 @@ paths: content: application/json: schema: - type: object + type: file description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get hints for a dependency vulnerability + summary: Download in-toto links for a supply chain tags: - - Vulnerabilities - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/{dependencyVulnID}/mitigate - : post: + - In-toto + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks: + get: parameters: - description: Organization slug in: path @@ -17401,38 +17671,20 @@ paths: required: true schema: type: string - - description: Vulnerability ID - in: path - name: dependencyVulnID - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - comment: - type: string - title: body - type: object - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedDependencyVulnDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Mitigate a dependency vulnerability + summary: List license risks tags: - - Vulnerabilities - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/batch: + - License Risk post: parameters: - description: Organization slug @@ -17463,9 +17715,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.BatchDependencyVulnStatus' - description: Request body - summary: body + properties: + componentPurl: + type: string + finalLicenseDecision: + type: string + title: body + type: object description: Request body required: true responses: @@ -17473,19 +17729,17 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.DetailedDependencyVulnDTO' - type: array + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.LicenseRisk' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Batch create vulnerability events + summary: Create license risk tags: - - Vulnerabilities - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/dependency-vulns/sync: - post: + - License Risk + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}: + get: parameters: - description: Organization slug in: path @@ -17511,30 +17765,27 @@ paths: required: true schema: type: string - requestBody: - content: - text/plain: - schema: - title: body - type: object - description: Request body + - description: License risk ID + in: path + name: licenseRiskID required: true + schema: + type: string responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Sync dependency vulnerabilities with third party integrations + summary: Get license risk details tags: - - Vulnerabilities - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events: - get: + - License Risk + post: parameters: - description: Organization slug in: path @@ -17560,32 +17811,37 @@ paths: required: true schema: type: string - - description: Page number - in: query - name: page + - description: License risk ID + in: path + name: licenseRiskID + required: true schema: - type: integer - - description: Page size - in: query - name: pageSize - schema: - type: integer + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/controllers.LicenseRiskStatus' + description: Request body + summary: body + description: Request body + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_VulnEventDTO' + $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List events for an asset version + summary: Create a license risk event tags: - - Vulnerability Events - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/events/{eventID}: - delete: + - License Risk + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/final-license-decision + : post: parameters: - description: Organization slug in: path @@ -17611,24 +17867,37 @@ paths: required: true schema: type: string - - description: Event ID + - description: License risk ID in: path - name: eventID + name: licenseRiskID required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.MakeFinalLicenseDecisionRequest' + description: Request body + summary: body + description: Request body + required: true responses: - "204": - description: No Content + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete an event + summary: Make final license decision tags: - - Vulnerability Events - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns: - get: + - License Risk + ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/mitigate + : post: parameters: - description: Organization slug in: path @@ -17654,27 +17923,39 @@ paths: required: true schema: type: string - - description: Search term - in: query - name: search + - description: License risk ID + in: path + name: licenseRiskID + required: true schema: type: string + requestBody: + content: + application/json: + schema: + properties: + comment: + type: string + title: body + type: object + description: Request body + required: true responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List first-party vulnerabilities by asset version + summary: Mitigate a license risk tags: - - Vulnerabilities - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID} - : get: + - License Risk + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/make-default/: + post: parameters: - description: Organization slug in: path @@ -17700,27 +17981,22 @@ paths: required: true schema: type: string - - description: Vulnerability ID - in: path - name: firstPartyVulnID - required: true - schema: - type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.AssetVersion' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get first-party vulnerability details + summary: Mark asset version as the default branch tags: - - Vulnerabilities - post: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/metrics: + get: parameters: - description: Organization slug in: path @@ -17746,37 +18022,27 @@ paths: required: true schema: type: string - - description: Vulnerability ID - in: path - name: firstPartyVulnID - required: true + - description: Artifact name + in: query + name: artifactName schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.FirstPartyVulnStatus' - description: Event data - summary: body - description: Event data - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create first-party vulnerability event + summary: Get asset version metrics tags: - - Vulnerabilities - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/events - : get: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/path-to-component/: + get: parameters: - description: Organization slug in: path @@ -17802,10 +18068,14 @@ paths: required: true schema: type: string - - description: Dependency vulnerability ID - in: path - name: dependencyVulnID - required: true + - description: Component pURL + in: query + name: purl + schema: + type: string + - description: Artifact name + in: query + name: artifactName schema: type: string responses: @@ -17814,18 +18084,20 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/dtos.VulnEventDTO' + items: + type: string + type: array type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List events for a vulnerability + summary: Get dependency paths leading to a component pURL tags: - - Vulnerability Events - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/{firstPartyVulnID}/mitigate - : post: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sarif.json: + get: parameters: - description: Organization slug in: path @@ -17851,39 +18123,22 @@ paths: required: true schema: type: string - - description: Vulnerability ID - in: path - name: firstPartyVulnID - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - justification: - type: string - title: body - type: object - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Mitigate a first-party vulnerability + summary: Get first-party vulnerabilities as SARIF tags: - Vulnerabilities - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/first-party-vulns/batch: - post: + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sbom.json/: + get: parameters: - description: Organization slug in: path @@ -17909,32 +18164,21 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.BatchFirstPartyVulnStatus' - description: Request body - summary: body - description: Request body - required: true responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.DetailedFirstPartyVulnDTO' - type: array + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Batch update first-party vulnerability states + summary: Get SBOM as CycloneDX JSON tags: - - Vulnerabilities - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/in-toto/{supplyChainID}/: + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/average-fixing-time/: get: parameters: - description: Organization slug @@ -17961,10 +18205,9 @@ paths: required: true schema: type: string - - description: Supply chain ID - in: path - name: supplyChainID - required: true + - description: Restrict results to a specific artifact + in: query + name: artifactName schema: type: string responses: @@ -17972,16 +18215,16 @@ paths: content: application/json: schema: - type: file + $ref: '#/components/schemas/dtos.RemediationTimeAverages' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Download in-toto links for a supply chain + summary: Get average fixing times for an asset version tags: - - In-toto - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks: + - Statistics + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/component-risk/: get: parameters: - description: Organization slug @@ -18008,6 +18251,11 @@ paths: required: true schema: type: string + - description: Restrict results to a specific artifact + in: query + name: artifactName + schema: + type: string responses: "200": content: @@ -18019,10 +18267,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List license risks + summary: Get component risk distribution for an asset version tags: - - License Risk - post: + - Statistics + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/risk-history/: + get: parameters: - description: Organization slug in: path @@ -18048,34 +18297,40 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - properties: - componentPurl: - type: string - finalLicenseDecision: - type: string - title: body - type: object - description: Request body + - description: Restrict results to a specific artifact + in: query + name: artifactName + schema: + type: string + - description: Start date (YYYY-MM-DD) + in: query + name: start + required: true + schema: + type: string + - description: End date (YYYY-MM-DD) + in: query + name: end required: true + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.LicenseRisk' + items: + $ref: '#/components/schemas/dtos.RiskHistoryDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create license risk + summary: Get risk history for an asset version tags: - - License Risk - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}: + - Statistics + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/vex.json/: get: parameters: - description: Organization slug @@ -18102,28 +18357,28 @@ paths: required: true schema: type: string - - description: License risk ID - in: path - name: licenseRiskID - required: true - schema: - type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get license risk details + summary: Get VEX as CycloneDX JSON tags: - - License Risk + - Asset Versions + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/sbom-file: post: parameters: + - description: Origin + in: header + name: X-Origin + schema: + type: string - description: Organization slug in: path name: organization @@ -18142,43 +18397,36 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: License risk ID - in: path - name: licenseRiskID - required: true - schema: - type: string requestBody: content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/controllers.LicenseRiskStatus' - description: Request body - summary: body - description: Request body + properties: + file: + description: SBOM file + format: binary + type: string + required: + - file + type: object + description: SBOM file required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' + $ref: '#/components/schemas/dtos.ScanResponse' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a license risk event + summary: Scan SBOM file tags: - - License Risk - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/final-license-decision - : post: + - Scanning + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/secrets/: + get: parameters: - description: Organization slug in: path @@ -18198,43 +18446,24 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: License risk ID - in: path - name: licenseRiskID - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.MakeFinalLicenseDecisionRequest' - description: Request body - summary: body - description: Request body - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' + additionalProperties: + type: string + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Make final license decision + summary: Get asset secrets tags: - - License Risk - ? /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/license-risks/{licenseRiskID}/mitigate - : post: + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/signing-key/: + post: parameters: - description: Organization slug in: path @@ -18254,45 +18483,26 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: License risk ID - in: path - name: licenseRiskID - required: true - schema: - type: string requestBody: content: - application/json: + text/plain: schema: - properties: - comment: - type: string title: body type: object description: Request body required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.DetailedLicenseRiskDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Mitigate a license risk + summary: Attach signing key to asset tags: - - License Risk - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/make-default/: - post: + - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/stats/risk-history/: + get: parameters: - description: Organization slug in: path @@ -18312,9 +18522,20 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug + - description: Restrict results to a specific artifact + in: query + name: artifactName + schema: + type: string + - description: Start date (YYYY-MM-DD) + in: query + name: start + required: true + schema: + type: string + - description: End date (YYYY-MM-DD) + in: query + name: end required: true schema: type: string @@ -18323,16 +18544,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.AssetVersion' + items: + $ref: '#/components/schemas/dtos.RiskHistoryWithVersionDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Mark asset version as the default branch + summary: Get risk history for an asset across all asset versions tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/metrics: + - Statistics + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules: get: parameters: - description: Organization slug @@ -18353,15 +18576,19 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true + - description: 'Page number (default: 1)' + in: query + name: page schema: - type: string - - description: Artifact name + type: integer + - description: 'Page size (default: 10, max: 100)' in: query - name: artifactName + name: pageSize + schema: + type: integer + - description: Search term for CVE ID or justification + in: query + name: search schema: type: string responses: @@ -18369,17 +18596,27 @@ paths: content: application/json: schema: + properties: + data: + items: + $ref: '#/components/schemas/dtos.VEXRuleDTO' + type: array + page: + type: integer + pageSize: + type: integer + total: + type: integer type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset version metrics + summary: List VEX rules for an asset tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/path-to-component/: - get: + - VEXRules + post: parameters: - description: Organization slug in: path @@ -18399,42 +18636,31 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.CreateVEXRuleRequest' + description: Rule data + summary: body + description: Rule data required: true - schema: - type: string - - description: Component pURL - in: query - name: purl - schema: - type: string - - description: Artifact name - in: query - name: artifactName - schema: - type: string responses: - "200": + "201": content: application/json: schema: - items: - items: - type: string - type: array - type: array - description: OK + $ref: '#/components/schemas/dtos.VEXRuleDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get dependency paths leading to a component pURL + summary: Create a VEX rule tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sarif.json: - get: + - VEXRules + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/{ruleId}: + delete: parameters: - description: Organization slug in: path @@ -18454,27 +18680,22 @@ paths: required: true schema: type: string - - description: Asset version slug + - description: Rule ID in: path - name: assetVersionSlug + name: ruleId required: true schema: type: string responses: - "200": - content: - application/json: - schema: - type: object - description: OK + "204": + description: No Content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get first-party vulnerabilities as SARIF + summary: Delete a VEX rule tags: - - Vulnerabilities - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/sbom.json/: + - VEXRules get: parameters: - description: Organization slug @@ -18495,9 +18716,9 @@ paths: required: true schema: type: string - - description: Asset version slug + - description: Rule ID in: path - name: assetVersionSlug + name: ruleId required: true schema: type: string @@ -18506,16 +18727,16 @@ paths: content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.VEXRuleDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get SBOM as CycloneDX JSON + summary: Get a VEX rule tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/average-fixing-time/: + - VEXRules + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations: get: parameters: - description: Organization slug @@ -18536,32 +18757,23 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: Restrict results to a specific artifact - in: query - name: artifactName - schema: - type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.RemediationTimeAverages' + additionalProperties: + $ref: '#/components/schemas/dtos.VexRuleRecommendation' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get average fixing times for an asset version + summary: Get crowdsourced VEX recommendations for all vulns of an asset tags: - - Statistics - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/component-risk/: + - CrowdsourcedVexing + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations/{dependencyVulnID}: get: parameters: - description: Organization slug @@ -18582,33 +18794,32 @@ paths: required: true schema: type: string - - description: Asset version slug + - description: Dependency vuln ID in: path - name: assetVersionSlug + name: dependencyVulnID required: true schema: type: string - - description: Restrict results to a specific artifact - in: query - name: artifactName - schema: - type: string responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.VexRuleRecommendation' description: OK + "204": + description: No recommendation available + "404": + description: Dependency vulnerability not found security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get component risk distribution for an asset version + summary: Get a crowdsourced VEX recommendation for a dependency vuln tags: - - Statistics - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/stats/risk-history/: - get: + - CrowdsourcedVexing + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/test: + post: parameters: - description: Organization slug in: path @@ -18628,46 +18839,32 @@ paths: required: true schema: type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: Restrict results to a specific artifact - in: query - name: artifactName - schema: - type: string - - description: Start date (YYYY-MM-DD) - in: query - name: start - required: true - schema: - type: string - - description: End date (YYYY-MM-DD) - in: query - name: end + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.TestVEXRulesRequest' + description: CEL expressions to test + summary: body + description: CEL expressions to test required: true - schema: - type: string responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.RiskHistoryDTO' - type: array + additionalProperties: + type: integer + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get risk history for an asset version + summary: Test VEX rules against the vulnerabilities they'd apply to tags: - - Statistics - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/vex.json/: + - VEXRules + /organizations/{organization}/projects/{projectSlug}/compliance: get: parameters: - description: Organization slug @@ -18682,40 +18879,25 @@ paths: required: true schema: type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string responses: "200": content: application/json: schema: - type: object + items: + type: array + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get VEX as CycloneDX JSON + summary: Get project compliance tags: - - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/sbom-file: - post: + - Compliance + /organizations/{organization}/projects/{projectSlug}/compliance-postures: + get: parameters: - - description: Origin - in: header - name: X-Origin - schema: - type: string - description: Organization slug in: path name: organization @@ -18728,41 +18910,21 @@ paths: required: true schema: type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - requestBody: - content: - multipart/form-data: - schema: - properties: - file: - description: SBOM file - format: binary - type: string - required: - - file - type: object - description: SBOM file - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ScanResponse' + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Scan SBOM file + summary: List compliance postures paged tags: - - Scanning - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/secrets/: + - Compliance Postures + /organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}: get: parameters: - description: Organization slug @@ -18777,9 +18939,9 @@ paths: required: true schema: type: string - - description: Asset slug + - description: Framework Control ID in: path - name: assetSlug + name: frameworkControlID required: true schema: type: string @@ -18788,18 +18950,15 @@ paths: content: application/json: schema: - additionalProperties: - type: string - type: object + $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get asset secrets + summary: Get compliance posture for a framework control tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/signing-key/: + - Compliance Postures post: parameters: - description: Organization slug @@ -18814,32 +18973,41 @@ paths: required: true schema: type: string - - description: Asset slug + - description: Framework Control ID in: path - name: assetSlug + name: frameworkControlID required: true schema: type: string requestBody: content: - text/plain: + application/json: schema: + properties: + justification: + type: string + status: + type: string title: body type: object - description: Request body + description: Event data required: true responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Attach signing key to asset + summary: Create a compliance posture event tags: - - Assets - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/stats/risk-history/: - get: + - Compliance Postures + /organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}: + post: parameters: - description: Organization slug in: path @@ -18853,47 +19021,43 @@ paths: required: true schema: type: string - - description: Asset slug + - description: Framework control ID in: path - name: assetSlug + name: frameworkControlID required: true schema: type: string - - description: Restrict results to a specific artifact - in: query - name: artifactName - schema: - type: string - - description: Start date (YYYY-MM-DD) - in: query - name: start + - description: Compliance component ID + in: path + name: complianceComponentID required: true schema: type: string - - description: End date (YYYY-MM-DD) - in: query - name: end + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/controllers.statementPayload' + description: Request body + summary: body + description: Request body required: true - schema: - type: string responses: - "200": + "201": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.RiskHistoryWithVersionDTO' - type: array - description: OK + $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get risk history for an asset across all asset versions + summary: Create a compliance statement for a component tags: - - Statistics - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules: - get: + - Compliance Components + /organizations/{organization}/projects/{projectSlug}/compliance-postures/components/{statementID}: + delete: parameters: - description: Organization slug in: path @@ -18907,53 +19071,27 @@ paths: required: true schema: type: string - - description: Asset slug + - description: Statement ID in: path - name: assetSlug + name: statementID required: true schema: type: string - - description: 'Page number (default: 1)' - in: query - name: page - schema: - type: integer - - description: 'Page size (default: 10, max: 100)' - in: query - name: pageSize - schema: - type: integer - - description: Search term for CVE ID or justification - in: query - name: search - schema: - type: string responses: "200": content: application/json: schema: - properties: - data: - items: - $ref: '#/components/schemas/dtos.VEXRuleDTO' - type: array - page: - type: integer - pageSize: - type: integer - total: - type: integer type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List VEX rules for an asset + summary: Delete a compliance statement tags: - - VEXRules - post: + - Compliance Components + put: parameters: - description: Organization slug in: path @@ -18967,9 +19105,9 @@ paths: required: true schema: type: string - - description: Asset slug + - description: Statement ID in: path - name: assetSlug + name: statementID required: true schema: type: string @@ -18977,27 +19115,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.CreateVEXRuleRequest' - description: Rule data + $ref: '#/components/schemas/controllers.statementPayload' + description: Request body summary: body - description: Rule data + description: Request body required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.VEXRuleDTO' - description: Created + $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a VEX rule + summary: Update a compliance statement tags: - - VEXRules - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/{ruleId}: - delete: + - Compliance Components + /organizations/{organization}/projects/{projectSlug}/compliance-postures/oscal: + get: parameters: - description: Organization slug in: path @@ -19011,28 +19149,21 @@ paths: required: true schema: type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Rule ID - in: path - name: ruleId - required: true - schema: - type: string responses: - "204": - description: No Content + "200": + content: + application/json: + schema: + type: object + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete a VEX rule + summary: Get OSCAL system security plan tags: - - VEXRules + - Compliance Postures + /organizations/{organization}/projects/{projectSlug}/compliance-postures/stats: get: parameters: - description: Organization slug @@ -19047,33 +19178,21 @@ paths: required: true schema: type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Rule ID - in: path - name: ruleId - required: true - schema: - type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.VEXRuleDTO' + $ref: '#/components/schemas/dtos.CompliancePostureStatsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get a VEX rule + summary: Get compliance posture stats tags: - - VEXRules - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations: + - Compliance Postures + /organizations/{organization}/projects/{projectSlug}/components: get: parameters: - description: Organization slug @@ -19088,29 +19207,21 @@ paths: required: true schema: type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string responses: "200": content: application/json: schema: - additionalProperties: - $ref: '#/components/schemas/dtos.VexRuleRecommendation' - type: object + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get crowdsourced VEX recommendations for all vulns of an asset + summary: Search component occurrences within a project tags: - - CrowdsourcedVexing - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/recommendations/{dependencyVulnID}: + - Components + /organizations/{organization}/projects/{projectSlug}/config-files/{config-file}: get: parameters: - description: Organization slug @@ -19125,38 +19236,27 @@ paths: required: true schema: type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Dependency vuln ID + - description: Config file ID in: path - name: dependencyVulnID + name: config-file required: true schema: type: string responses: "200": content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/dtos.VexRuleRecommendation' - description: OK - "204": - description: No recommendation available - "404": - description: Dependency vulnerability not found + type: string + description: Config file content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get a crowdsourced VEX recommendation for a dependency vuln + summary: Get project config file tags: - - CrowdsourcedVexing - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/vex-rules/test: - post: + - Projects + put: parameters: - description: Organization slug in: path @@ -19170,47 +19270,44 @@ paths: required: true schema: type: string - - description: Asset slug + - description: Config file ID in: path - name: assetSlug + name: config-file required: true schema: type: string requestBody: content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/dtos.TestVEXRulesRequest' - description: CEL expressions to test - summary: body - description: CEL expressions to test + title: body + type: string + description: Config file content required: true responses: "200": content: - application/json: + text/plain: schema: - additionalProperties: - type: integer - type: object - description: OK + type: string + description: Updated config file content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Test VEX rules against the vulnerabilities they'd apply to + summary: Update project config file tags: - - VEXRules - /organizations/{organization}/projects/{projectSlug}/compliance: + - Projects + /organizations/{organization}/projects/{projectSlug}/dependency-proxy-urls/: get: parameters: - - description: Organization slug + - description: organization slug in: path name: organization required: true schema: type: string - - description: Project slug + - description: project slug in: path name: projectSlug required: true @@ -19221,18 +19318,18 @@ paths: content: application/json: schema: - items: - type: array - type: array + additionalProperties: + type: string + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get project compliance + summary: Get project dependency proxy URLs tags: - - Compliance - /organizations/{organization}/projects/{projectSlug}/compliance-postures: + - Dependency Firewall + /organizations/{organization}/projects/{projectSlug}/dependency-vulns: get: parameters: - description: Organization slug @@ -19247,22 +19344,30 @@ paths: required: true schema: type: string + - description: Search term + in: query + name: search + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_CompliancePostureWithControlDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List compliance postures paged + summary: List dependency vulnerabilities by project tags: - - Compliance Postures - /organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}: + - Vulnerabilities + /organizations/{organization}/projects/{projectSlug}/external/{providerID}: get: + description: Returns the full tree of projects, sub-projects, assets, asset + versions and artifacts that were dynamically created by an external inventory + provider (e.g. k8s-devguard-image-inventory) for the given providerID. parameters: - description: Organization slug in: path @@ -19276,9 +19381,9 @@ paths: required: true schema: type: string - - description: Framework Control ID + - description: External provider ID in: path - name: frameworkControlID + name: providerID required: true schema: type: string @@ -19287,16 +19392,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' + items: + $ref: '#/components/schemas/dtos.ProjectExternalEntityTree' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get compliance posture for a framework control + summary: List externally managed project/asset tree tags: - - Compliance Postures + - External Entity post: + description: Called by external inventory providers (e.g. k8s-devguard-image-inventory) + to upsert or delete a dynamically managed project hierarchy. On verb=update, + creates or updates the project, sub-project, asset, asset version and artifact, + then processes the supplied CycloneDX SBOM and triggers a vulnerability scan. + On verb=delete, removes the artifact/asset-version/asset/project entries cascading + upward as long as no other data references them. parameters: - description: Organization slug in: path @@ -19310,9 +19423,9 @@ paths: required: true schema: type: string - - description: Framework Control ID + - description: External provider ID in: path - name: frameworkControlID + name: providerID required: true schema: type: string @@ -19320,31 +19433,23 @@ paths: content: application/json: schema: - properties: - justification: - type: string - status: - type: string - title: body - type: object - description: Event data + $ref: '#/components/schemas/dtos.ExternalSubprojectRequestDTO' + description: Request body + summary: body + description: Request body required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.CompliancePostureWithDetailsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a compliance posture event + summary: Sync or delete an externally managed project/asset tree tags: - - Compliance Postures - /organizations/{organization}/projects/{projectSlug}/compliance-postures/{frameworkControlID}/components/{complianceComponentID}: - post: + - External Entity + /organizations/{organization}/projects/{projectSlug}/integrations/webhook/{id}: + delete: parameters: - description: Organization slug in: path @@ -19358,43 +19463,23 @@ paths: required: true schema: type: string - - description: Framework control ID - in: path - name: frameworkControlID - required: true - schema: - type: string - - description: Compliance component ID + - description: Webhook ID in: path - name: complianceComponentID + name: id required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/controllers.statementPayload' - description: Request body - summary: body - description: Request body - required: true responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' - description: Created + "200": + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create a compliance statement for a component + summary: Delete webhook integration (project) tags: - - Compliance Components - /organizations/{organization}/projects/{projectSlug}/compliance-postures/components/{statementID}: - delete: + - Webhooks + put: parameters: - description: Organization slug in: path @@ -19408,27 +19493,37 @@ paths: required: true schema: type: string - - description: Statement ID + - description: Webhook ID in: path - name: statementID + name: id required: true schema: type: string - responses: - "200": - content: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.WebhookUpdateRequestDTO' + description: Webhook data + summary: body + description: Webhook data + required: true + responses: + "200": + content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete a compliance statement + summary: Update webhook integration (project) tags: - - Compliance Components - put: + - Webhooks + /organizations/{organization}/projects/{projectSlug}/integrations/webhook/test: + post: parameters: - description: Organization slug in: path @@ -19442,37 +19537,36 @@ paths: required: true schema: type: string - - description: Statement ID - in: path - name: statementID - required: true - schema: - type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/controllers.statementPayload' - description: Request body + $ref: '#/components/schemas/dtos.WebhookTestRequestDTO' + description: Test webhook data summary: body - description: Request body + description: Test webhook data required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ComplianceComponentImplementsControlStatementDTO' + properties: + message: + type: string + payloadType: + type: string + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update a compliance statement + summary: Test webhook integration (project) tags: - - Compliance Components - /organizations/{organization}/projects/{projectSlug}/compliance-postures/oscal: - get: + - Webhooks + /organizations/{organization}/projects/{projectSlug}/integrations/webhook/test-and-save: + post: parameters: - description: Organization slug in: path @@ -19486,21 +19580,30 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.WebhookCreateRequestDTO' + description: Webhook data + summary: body + description: Webhook data + required: true responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get OSCAL system security plan + summary: Create webhook integration (project) tags: - - Compliance Postures - /organizations/{organization}/projects/{projectSlug}/compliance-postures/stats: + - Webhooks + /organizations/{organization}/projects/{projectSlug}/logs/: get: parameters: - description: Organization slug @@ -19515,21 +19618,46 @@ paths: required: true schema: type: string + - description: Page number + in: query + name: page + schema: + type: integer + - description: Page size + in: query + name: pageSize + schema: + type: integer + - description: Search term + in: query + name: search + schema: + type: string + - description: Sort query, e.g. sort[createdAt]=desc + in: query + name: sort + schema: + type: string + - description: Filter query, e.g. filterQuery[logs.log_level][is]=error + in: query + name: filterQuery + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.CompliancePostureStatsDTO' + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get compliance posture stats + summary: List project logs tags: - - Compliance Postures - /organizations/{organization}/projects/{projectSlug}/components: + - Logs + /organizations/{organization}/projects/{projectSlug}/members: get: parameters: - description: Organization slug @@ -19549,17 +19677,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ComponentOccurrenceDTO' + items: + $ref: '#/components/schemas/dtos.UserDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Search component occurrences within a project + summary: List project members tags: - - Components - /organizations/{organization}/projects/{projectSlug}/config-files/{config-file}: - get: + - Projects + post: parameters: - description: Organization slug in: path @@ -19573,27 +19702,27 @@ paths: required: true schema: type: string - - description: Config file ID - in: path - name: config-file + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ProjectInviteRequest' + description: Request body + summary: body + description: Request body required: true - schema: - type: string responses: "200": - content: - text/plain: - schema: - type: string - description: Config file content + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get project config file + summary: Invite members to project tags: - Projects - put: + /organizations/{organization}/projects/{projectSlug}/members/{userID}/: + delete: parameters: - description: Organization slug in: path @@ -19607,104 +19736,63 @@ paths: required: true schema: type: string - - description: Config file ID + - description: User ID in: path - name: config-file + name: userID required: true schema: type: string - requestBody: - content: - text/plain: - schema: - title: body - type: string - description: Config file content - required: true responses: "200": - content: - text/plain: - schema: - type: string - description: Updated config file content + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update project config file + summary: Remove member from project tags: - Projects - /organizations/{organization}/projects/{projectSlug}/dependency-proxy-urls/: - get: + put: parameters: - - description: organization slug + - description: Organization slug in: path name: organization required: true schema: type: string - - description: project slug + - description: Project slug in: path name: projectSlug required: true schema: type: string - responses: - "200": - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get project dependency proxy URLs - tags: - - Dependency Firewall - /organizations/{organization}/projects/{projectSlug}/dependency-vulns: - get: - parameters: - - description: Organization slug + - description: User ID in: path - name: organization + name: userID required: true schema: type: string - - description: Project slug - in: path - name: projectSlug + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ProjectChangeRoleRequest' + description: Request body + summary: body + description: Request body required: true - schema: - type: string - - description: Search term - in: query - name: search - schema: - type: string responses: "200": - content: - application/json: - schema: - type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List dependency vulnerabilities by project + summary: Change member role in project tags: - - Vulnerabilities - /organizations/{organization}/projects/{projectSlug}/external/{providerID}: + - Projects + /organizations/{organization}/projects/{projectSlug}/pats: get: - description: Returns the full tree of projects, sub-projects, assets, asset - versions and artifacts that were dynamically created by an external inventory - provider (e.g. k8s-devguard-image-inventory) for the given providerID. parameters: - description: Organization slug in: path @@ -19718,35 +19806,23 @@ paths: required: true schema: type: string - - description: External provider ID - in: path - name: providerID - required: true - schema: - type: string responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/dtos.ProjectExternalEntityTree' + $ref: '#/components/schemas/dtos.PATDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List externally managed project/asset tree + summary: List project access tokens tags: - - External Entity + - Authentication post: - description: Called by external inventory providers (e.g. k8s-devguard-image-inventory) - to upsert or delete a dynamically managed project hierarchy. On verb=update, - creates or updates the project, sub-project, asset, asset version and artifact, - then processes the supplied CycloneDX SBOM and triggers a vulnerability scan. - On verb=delete, removes the artifact/asset-version/asset/project entries cascading - upward as long as no other data references them. parameters: - description: Organization slug in: path @@ -19760,32 +19836,30 @@ paths: required: true schema: type: string - - description: External provider ID - in: path - name: providerID - required: true - schema: - type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/dtos.ExternalSubprojectRequestDTO' + $ref: '#/components/schemas/dtos.PatCreateRequest' description: Request body summary: body description: Request body required: true responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.PATCreateResponseDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Sync or delete an externally managed project/asset tree + summary: Create project access token tags: - - External Entity - /organizations/{organization}/projects/{projectSlug}/integrations/webhook/{id}: + - Authentication + /organizations/{organization}/projects/{projectSlug}/pats/{tokenID}: delete: parameters: - description: Organization slug @@ -19800,9 +19874,9 @@ paths: required: true schema: type: string - - description: Webhook ID + - description: Token ID in: path - name: id + name: tokenID required: true schema: type: string @@ -19813,10 +19887,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete webhook integration (project) + summary: Delete project access token tags: - - Webhooks - put: + - Authentication + /organizations/{organization}/projects/{projectSlug}/policies: + get: parameters: - description: Organization slug in: path @@ -19830,37 +19905,24 @@ paths: required: true schema: type: string - - description: Webhook ID - in: path - name: id - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.WebhookUpdateRequestDTO' - description: Webhook data - summary: body - description: Webhook data - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' + items: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update webhook integration (project) + summary: List project policies tags: - - Webhooks - /organizations/{organization}/projects/{projectSlug}/integrations/webhook/test: - post: + - Policies + /organizations/{organization}/projects/{projectSlug}/policies/{policyID}: + delete: parameters: - description: Organization slug in: path @@ -19874,36 +19936,23 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.WebhookTestRequestDTO' - description: Test webhook data - summary: body - description: Test webhook data + - description: Policy ID + in: path + name: policyID required: true + schema: + type: string responses: - "200": - content: - application/json: - schema: - properties: - message: - type: string - payloadType: - type: string - type: object - description: OK + "204": + description: No Content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Test webhook integration (project) + summary: Disable a policy for a project tags: - - Webhooks - /organizations/{organization}/projects/{projectSlug}/integrations/webhook/test-and-save: - post: + - Policies + put: parameters: - description: Organization slug in: path @@ -19917,30 +19966,23 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.WebhookCreateRequestDTO' - description: Webhook data - summary: body - description: Webhook data + - description: Policy ID + in: path + name: policyID required: true + schema: + type: string responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.WebhookIntegrationDTO' - description: OK + "204": + description: No Content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create webhook integration (project) + summary: Enable a policy for a project tags: - - Webhooks - /organizations/{organization}/projects/{projectSlug}/logs/: + - Policies + /organizations/{organization}/projects/{projectSlug}/releases: get: parameters: - description: Organization slug @@ -19955,47 +19997,26 @@ paths: required: true schema: type: string - - description: Page number - in: query - name: page - schema: - type: integer - - description: Page size - in: query - name: pageSize - schema: - type: integer - description: Search term in: query name: search schema: type: string - - description: Sort query, e.g. sort[createdAt]=desc - in: query - name: sort - schema: - type: string - - description: Filter query, e.g. filterQuery[logs.log_level][is]=error - in: query - name: filterQuery - schema: - type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_LogDTO' + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ReleaseDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List project logs + summary: List releases tags: - - Logs - /organizations/{organization}/projects/{projectSlug}/members: - get: + - Releases + post: parameters: - description: Organization slug in: path @@ -20009,23 +20030,31 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ReleaseCreateRequest' + description: Release data + summary: body + description: Release data + required: true responses: - "200": + "201": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.UserDTO' - type: array - description: OK + $ref: '#/components/schemas/dtos.ReleaseDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List project members + summary: Create release tags: - - Projects - post: + - Releases + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}: + delete: parameters: - description: Organization slug in: path @@ -20039,27 +20068,23 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ProjectInviteRequest' - description: Request body - summary: body - description: Request body + - description: Release ID + in: path + name: releaseID required: true + schema: + type: string responses: - "200": - description: OK + "204": + description: No Content security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Invite members to project + summary: Delete release tags: - - Projects - /organizations/{organization}/projects/{projectSlug}/members/{userID}/: - delete: + - Releases + get: parameters: - description: Organization slug in: path @@ -20073,23 +20098,27 @@ paths: required: true schema: type: string - - description: User ID + - description: Release ID in: path - name: userID + name: releaseID required: true schema: type: string responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ReleaseDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Remove member from project + summary: Get release details tags: - - Projects - put: + - Releases + patch: parameters: - description: Organization slug in: path @@ -20103,9 +20132,9 @@ paths: required: true schema: type: string - - description: User ID + - description: Release ID in: path - name: userID + name: releaseID required: true schema: type: string @@ -20113,22 +20142,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.ProjectChangeRoleRequest' - description: Request body + $ref: '#/components/schemas/dtos.ReleasePatchRequest' + description: Release data summary: body - description: Request body + description: Release data required: true responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ReleaseDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Change member role in project + summary: Update release tags: - - Projects - /organizations/{organization}/projects/{projectSlug}/pats: + - Releases + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/candidates: get: parameters: - description: Organization slug @@ -20143,23 +20176,27 @@ paths: required: true schema: type: string + - description: Release ID + in: query + name: releaseID + schema: + type: string responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/dtos.PATDTO' - type: array + $ref: '#/components/schemas/dtos.CandidatesResponseDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List project access tokens + summary: List release candidates tags: - - Authentication - post: + - Releases + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/csaf.json: + get: parameters: - description: Organization slug in: path @@ -20173,31 +20210,18 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.PatCreateRequest' - description: Request body - summary: body - description: Request body + - description: Release ID + in: path + name: releaseID required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.PATCreateResponseDTO' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Create project access token + schema: + type: string + responses: null + summary: Get release VEX as CSAF tags: - - Authentication - /organizations/{organization}/projects/{projectSlug}/pats/{tokenID}: - delete: + - Releases + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items: + post: parameters: - description: Organization slug in: path @@ -20211,54 +20235,36 @@ paths: required: true schema: type: string - - description: Token ID + - description: Release ID in: path - name: tokenID + name: releaseID required: true schema: type: string - responses: - "200": - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Delete project access token - tags: - - Authentication - /organizations/{organization}/projects/{projectSlug}/policies: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.ReleaseItemDTO' + description: Release item data + summary: body + description: Release item data required: true - schema: - type: string responses: - "200": + "201": content: application/json: schema: - items: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_database_models.Policy' - type: array - description: OK + $ref: '#/components/schemas/dtos.ReleaseItemDTO' + description: Created security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List project policies + summary: Add item to release tags: - - Policies - /organizations/{organization}/projects/{projectSlug}/policies/{policyID}: + - Releases + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items/{itemID}: delete: parameters: - description: Organization slug @@ -20273,9 +20279,15 @@ paths: required: true schema: type: string - - description: Policy ID + - description: Release ID in: path - name: policyID + name: releaseID + required: true + schema: + type: string + - description: Item ID + in: path + name: itemID required: true schema: type: string @@ -20286,10 +20298,11 @@ paths: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Disable a policy for a project + summary: Remove item from release tags: - - Policies - put: + - Releases + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/openvex.json: + get: parameters: - description: Organization slug in: path @@ -20303,23 +20316,17 @@ paths: required: true schema: type: string - - description: Policy ID + - description: Release ID in: path - name: policyID + name: releaseID required: true schema: type: string - responses: - "204": - description: No Content - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Enable a policy for a project + responses: null + summary: Get release VEX as OpenVEX tags: - - Policies - /organizations/{organization}/projects/{projectSlug}/releases: + - Releases + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.json: get: parameters: - description: Organization slug @@ -20334,9 +20341,10 @@ paths: required: true schema: type: string - - description: Search term - in: query - name: search + - description: Release ID + in: path + name: releaseID + required: true schema: type: string responses: @@ -20344,16 +20352,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ReleaseDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List releases + summary: Get release SBOM as JSON tags: - Releases - post: + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.xml: + get: parameters: - description: Organization slug in: path @@ -20367,31 +20376,28 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ReleaseCreateRequest' - description: Release data - summary: body - description: Release data + - description: Release ID + in: path + name: releaseID required: true + schema: + type: string responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ReleaseDTO' - description: Created + type: object + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Create release + summary: Get release SBOM as XML tags: - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}: - delete: + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/average-fixing-time/: + get: parameters: - description: Organization slug in: path @@ -20412,15 +20418,20 @@ paths: schema: type: string responses: - "204": - description: No Content + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.RemediationTimeAverages' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Delete release + summary: Get average remediation times for a release tags: - - Releases + - Statistics + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/risk-history/: get: parameters: - description: Organization slug @@ -20441,21 +20452,36 @@ paths: required: true schema: type: string + - description: Start date (YYYY-MM-DD) + in: query + name: start + required: true + schema: + type: string + - description: End date (YYYY-MM-DD) + in: query + name: end + required: true + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ReleaseDTO' + items: + $ref: '#/components/schemas/dtos.RiskHistoryDTO' + type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get release details + summary: Get risk history for a release tags: - - Releases - patch: + - Statistics + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.json: + get: parameters: - description: Organization slug in: path @@ -20475,30 +20501,21 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ReleasePatchRequest' - description: Release data - summary: body - description: Release data - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ReleaseDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Update release + summary: Get release VEX as JSON tags: - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/candidates: + /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.xml: get: parameters: - description: Organization slug @@ -20514,8 +20531,9 @@ paths: schema: type: string - description: Release ID - in: query + in: path name: releaseID + required: true schema: type: string responses: @@ -20523,16 +20541,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/dtos.CandidatesResponseDTO' + type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: List release candidates + summary: Get release VEX as XML tags: - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/csaf.json: + /organizations/{organization}/projects/{projectSlug}/releases/candidates: get: parameters: - description: Organization slug @@ -20548,17 +20566,26 @@ paths: schema: type: string - description: Release ID - in: path + in: query name: releaseID - required: true schema: type: string - responses: null - summary: Get release VEX as CSAF + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.CandidatesResponseDTO' + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + - BearerAuth: [] + summary: List release candidates tags: - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items: - post: + /organizations/{organization}/projects/{projectSlug}/resources: + get: parameters: - description: Organization slug in: path @@ -20572,37 +20599,32 @@ paths: required: true schema: type: string - - description: Release ID - in: path - name: releaseID - required: true + - description: Search query for filtering sub-projects and assets + in: query + name: search + schema: + type: string + - description: Only list children of this project ID + in: query + name: parentId schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ReleaseItemDTO' - description: Release item data - summary: body - description: Release item data - required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/dtos.ReleaseItemDTO' - description: Created + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectAssetDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Add item to release + summary: List sub-projects and assets tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/items/{itemID}: - delete: + - Projects + /organizations/{organization}/projects/search/: + get: parameters: - description: Organization slug in: path @@ -20610,60 +20632,36 @@ paths: required: true schema: type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID - in: path - name: releaseID - required: true + - description: Search query + in: query + name: search schema: type: string - - description: Item ID - in: path - name: itemID - required: true + - description: Page number + in: query + name: page schema: - type: string + type: integer + - description: Page size + in: query + name: pageSize + schema: + type: integer responses: - "204": - description: No Content + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectDTO' + description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Remove item from release - tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/openvex.json: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID - in: path - name: releaseID - required: true - schema: - type: string - responses: null - summary: Get release VEX as OpenVEX + summary: Search projects with sub-projects and assets tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.json: + - Projects + /organizations/{organization}/settings: get: parameters: - description: Organization slug @@ -20672,34 +20670,26 @@ paths: required: true schema: type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID - in: path - name: releaseID - required: true - schema: - type: string responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.OrgSettingsDTO' description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get release SBOM as JSON + summary: Get organization admin settings tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/sbom.xml: + - Organizations + /organizations/{organization}/stats/vuln-statistics/: get: + description: Returns aggregated security statistics for an organization, including + vulnerability distribution, top vulnerable projects/assets/artifacts, most + used components, common CVEs, risk history, remediation metrics, and ecosystem + usage. All queries are executed in parallel. parameters: - description: Organization slug in: path @@ -20707,33 +20697,43 @@ paths: required: true schema: type: string - - description: Project slug - in: path - name: projectSlug - required: true + - description: 'Max number of top vulnerable projects/assets/artifacts to return + (default: 5)' + in: query + name: orgComponentsLimit schema: - type: string - - description: Release ID - in: path - name: releaseID - required: true + type: integer + - description: 'Max number of top CVEs to return (default: 5)' + in: query + name: topCVEsLimit schema: - type: string + type: integer + - description: 'Max number of top components to return (default: 5)' + in: query + name: topComponentsLimit + schema: + type: integer + - description: 'Max number of top ecosystems to return (default: 5)' + in: query + name: topEcosystemsLimit + schema: + type: integer + - description: Bypass the 15 minute statistics cache + in: query + name: forceRefresh + schema: + type: boolean responses: "200": content: application/json: schema: - type: object + $ref: '#/components/schemas/dtos.OrgOverview' description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get release SBOM as XML + summary: Get organization statistics overview tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/average-fixing-time/: + - Organizations + /organizations/{organization}/trigger-sync: get: parameters: - description: Organization slug @@ -20742,1031 +20742,191 @@ paths: required: true schema: type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID - in: path - name: releaseID - required: true - schema: - type: string responses: - "200": + "204": + description: No Content + "400": content: application/json: schema: - $ref: '#/components/schemas/dtos.RemediationTimeAverages' - description: OK + type: string + description: organization is not an external entity provider security: - CookieAuth: [] - PATAuth: [] - - BearerAuth: [] - summary: Get average remediation times for a release + summary: Trigger a sync for the given org tags: - - Statistics - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/stats/risk-history/: + - Organizations + /pats: get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID - in: path - name: releaseID - required: true - schema: - type: string - - description: Start date (YYYY-MM-DD) - in: query - name: start - required: true - schema: - type: string - - description: End date (YYYY-MM-DD) - in: query - name: end - required: true - schema: - type: string responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/dtos.RiskHistoryDTO' + $ref: '#/components/schemas/dtos.PATDTO' type: array description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get risk history for a release + summary: List personal access tokens tags: - - Statistics - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.json: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID - in: path - name: releaseID + - Authentication + post: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dtos.PatCreateRequest' + description: Request body + summary: body + description: Request body required: true - schema: - type: string responses: "200": content: application/json: schema: + properties: + createdAt: + type: string + description: + type: string + fingerprint: + type: string + id: + type: string + pubKey: + type: string + scopes: + type: string + userID: + type: string type: object description: OK security: - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get release VEX as JSON + summary: Create personal access token tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/releases/{releaseID}/vex.xml: - get: + - Authentication + /pats/{tokenID}: + delete: parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID + - description: Token ID in: path - name: releaseID + name: tokenID required: true schema: type: string responses: "200": - content: - application/json: - schema: - type: object description: OK security: - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Get release VEX as XML - tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/releases/candidates: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Release ID - in: query - name: releaseID - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.CandidatesResponseDTO' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: List release candidates - tags: - - Releases - /organizations/{organization}/projects/{projectSlug}/resources: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Search query for filtering sub-projects and assets - in: query - name: search - schema: - type: string - - description: Only list children of this project ID - in: query - name: parentId - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectAssetDTO' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: List sub-projects and assets - tags: - - Projects - /organizations/{organization}/projects/search/: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Search query - in: query - name: search - schema: - type: string - - description: Page number - in: query - name: page - schema: - type: integer - - description: Page size - in: query - name: pageSize - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/github_com_l3montree-dev_devguard_shared.Paged-dtos_ProjectDTO' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Search projects with sub-projects and assets - tags: - - Projects - /organizations/{organization}/settings: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.OrgSettingsDTO' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get organization admin settings - tags: - - Organizations - /organizations/{organization}/stats/vuln-statistics/: - get: - description: Returns aggregated security statistics for an organization, including - vulnerability distribution, top vulnerable projects/assets/artifacts, most - used components, common CVEs, risk history, remediation metrics, and ecosystem - usage. All queries are executed in parallel. - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: 'Max number of top vulnerable projects/assets/artifacts to return - (default: 5)' - in: query - name: orgComponentsLimit - schema: - type: integer - - description: 'Max number of top CVEs to return (default: 5)' - in: query - name: topCVEsLimit - schema: - type: integer - - description: 'Max number of top components to return (default: 5)' - in: query - name: topComponentsLimit - schema: - type: integer - - description: 'Max number of top ecosystems to return (default: 5)' - in: query - name: topEcosystemsLimit - schema: - type: integer - - description: Bypass the 15 minute statistics cache - in: query - name: forceRefresh - schema: - type: boolean - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.OrgOverview' - description: OK - summary: Get organization statistics overview - tags: - - Organizations - /organizations/{organization}/trigger-sync: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - responses: - "204": - description: No Content - "400": - content: - application/json: - schema: - type: string - description: organization is not an external entity provider - security: - - CookieAuth: [] - - PATAuth: [] - summary: Trigger a sync for the given org - tags: - - Organizations - /pats: - get: - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/dtos.PATDTO' - type: array - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: List personal access tokens + summary: Delete personal access token tags: - Authentication + /pats/revoke-by-private-key: post: requestBody: content: application/json: - schema: - $ref: '#/components/schemas/dtos.PatCreateRequest' - description: Request body - summary: body - description: Request body - required: true - responses: - "200": - content: - application/json: - schema: - properties: - createdAt: - type: string - description: - type: string - fingerprint: - type: string - id: - type: string - pubKey: - type: string - scopes: - type: string - userID: - type: string - type: object - description: OK - security: - - CookieAuth: [] - summary: Create personal access token - tags: - - Authentication - /pats/{tokenID}: - delete: - parameters: - - description: Token ID - in: path - name: tokenID - required: true - schema: - type: string - responses: - "200": - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Delete personal access token - tags: - - Authentication - /pats/revoke-by-private-key: - post: - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.RevokeByPrivateKeyRequest' - description: Request body - summary: body - description: Request body - required: true - responses: - "200": - description: OK - summary: Revoke PAT by private key - tags: - - Authentication - /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge}: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Badge type - in: path - name: badge - required: true - schema: - type: string - responses: - "200": - content: - image/svg+xml: - schema: - type: string - description: SVG badge - summary: Get asset badge - tags: - - Assets - /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json: - get: - responses: - "200": - content: - application/json: - schema: - type: object - description: CSAF advisory in JSON format - summary: Get an aggregated CSAF VEX for all of the artifact's vulnerabilities - tags: - - Artifacts - /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string - responses: - "200": - content: - application/json: - schema: - type: object - description: OpenVEX document in JSON format - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get VEX in OpenVEX JSON format - tags: - - Artifacts - /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string - responses: - "200": - content: - application/json: - schema: - type: object - description: CycloneDX BOM in JSON format - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get SBOM in JSON format - tags: - - Artifacts - /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json: - get: - parameters: - - description: Organization slug - in: path - name: organization - required: true - schema: - type: string - - description: Project slug - in: path - name: projectSlug - required: true - schema: - type: string - - description: Asset slug - in: path - name: assetSlug - required: true - schema: - type: string - - description: Asset version slug - in: path - name: assetVersionSlug - required: true - schema: - type: string - - description: Artifact name - in: path - name: artifactName - required: true - schema: - type: string - responses: - "200": - content: - application/json: - schema: - type: object - description: CycloneDX VEX in JSON format - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Get VEX in JSON format - tags: - - Artifacts - /renovate/recommendation: - get: - parameters: - - description: Package name - in: query - name: packageName - required: true - schema: - type: string - - description: Current version value - in: query - name: currentValue - required: true - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.Recommendation' - description: OK - summary: Get recommended fixed version for a package - tags: - - Vulnerabilities - /resolve: - get: - description: Resolves an organization, project or asset UUID to the slugs the - frontend needs to build a human readable URL. Exactly one of the query parameters - must be set. - parameters: - - description: Organization ID - in: query - name: orgId - schema: - type: string - - description: Project ID - in: query - name: projectId - schema: - type: string - - description: Asset ID - in: query - name: assetId - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.PermalinkResponse' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Resolve a permalink - tags: - - Organizations - /sarif-scan: - post: - deprecated: true - parameters: - - description: Asset version name - in: header - name: X-Asset-Ref - schema: - type: string - - description: Tag flag - in: header - name: X-Tag - schema: - type: string - - description: Default branch - in: header - name: X-Asset-Default-Branch - schema: - type: string - - description: Scanner ID - in: header - name: X-Scanner - required: true - schema: - type: string - - description: Asset name as // - in: header - name: X-Asset-Name - required: true - schema: - type: string - requestBody: - content: - text/plain: - schema: - title: body - type: object - description: SARIF scan result - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.FirstPartyScanResponse' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Scan for first-party vulnerabilities - tags: - - Scanning - /sarif-scan-unauthenticated: - post: - deprecated: true - parameters: - - description: Scanner ID - in: header - name: X-Scanner - required: true - schema: - type: string - requestBody: - content: - text/plain: - schema: - title: body - type: object - description: SARIF scan result - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.FirstPartyScanResponse' - description: OK - summary: Scan for first-party vulnerabilities without authentication (scan-only, - results are not saved) - tags: - - Scanning - /scan: - post: - deprecated: true - parameters: - - description: Asset version name - in: header - name: X-Asset-Ref - schema: - type: string - - description: Artifact name - in: header - name: X-Artifact-Name - schema: - type: string - - description: Tag flag - in: header - name: X-Tag - schema: - type: string - - description: Default branch - in: header - name: X-Asset-Default-Branch - schema: - type: string - - description: Origin - in: header - name: X-Origin - schema: - type: string - - description: Scanner ID - in: header - name: X-Scanner - schema: - type: string - - description: Asset name as // - in: header - name: X-Asset-Name - required: true - schema: - type: string - requestBody: - content: - text/plain: - schema: - title: body - type: object - description: CycloneDX SBOM - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ScanResponse' - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - - BearerAuth: [] - summary: Scan for dependency vulnerabilities - tags: - - Scanning - /scan-unauthenticated: - post: - deprecated: true - requestBody: - content: - text/plain: - schema: - title: body - type: object - description: CycloneDX SBOM - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/dtos.ScanResponse' - description: OK - summary: Scan for dependency vulnerabilities without authentication (scan-only, - results are not saved) - tags: - - Scanning - /trigger-sync: - get: - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/dtos.OrgDTO' - type: array - description: OK - security: - - CookieAuth: [] - - PATAuth: [] - summary: Trigger a sync for the current session's org - tags: - - Organizations - /v2: - head: - responses: - "200": - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: OCI Distribution Spec v2 version check - tags: - - Dependency Firewall - /v2/: - get: - responses: - "200": - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: OCI Distribution Spec v2 version check - tags: - - Dependency Firewall - /v2/{registry}/{image}/blobs/{digest}: - get: - parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: registry hostname - in: path - name: registry - required: true - schema: - type: string - - description: image namespace - in: path - name: namespace - schema: - type: string - - description: image name - in: path - name: image - required: true - schema: - type: string - - description: blob digest - in: path - name: digest + schema: + $ref: '#/components/schemas/dtos.RevokeByPrivateKeyRequest' + description: Request body + summary: body + description: Request body required: true - schema: - type: string responses: "200": - content: - application/json: - schema: - type: file description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy OCI image blob download + summary: Revoke PAT by private key tags: - - Dependency Firewall - head: + - Authentication + /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/badges/{badge}: + get: parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: registry hostname + - description: Organization slug in: path - name: registry + name: organization required: true schema: type: string - - description: image namespace + - description: Project slug in: path - name: namespace + name: projectSlug + required: true schema: type: string - - description: image name + - description: Asset slug in: path - name: image + name: assetSlug required: true schema: type: string - - description: blob digest + - description: Badge type in: path - name: digest + name: badge required: true schema: type: string + responses: + "200": + content: + image/svg+xml: + schema: + type: string + description: SVG badge + summary: Get asset badge + tags: + - Assets + /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/csaf.json: + get: responses: "200": content: application/json: schema: - type: file - description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy OCI image blob download + type: object + description: CSAF advisory in JSON format + summary: Get an aggregated CSAF VEX for all of the artifact's vulnerabilities tags: - - Dependency Firewall - /v2/{registry}/{image}/manifests/{reference}: + - Artifacts + /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json: get: parameters: - - description: dependency proxy secret + - description: Organization slug in: path - name: secret + name: organization + required: true schema: type: string - - description: registry hostname + - description: Project slug in: path - name: registry + name: projectSlug required: true schema: type: string - - description: image namespace + - description: Asset slug in: path - name: namespace + name: assetSlug + required: true schema: type: string - - description: image name + - description: Asset version slug in: path - name: image + name: assetVersionSlug required: true schema: type: string - - description: tag or digest + - description: Artifact name in: path - name: reference + name: artifactName required: true schema: type: string @@ -21775,42 +20935,45 @@ paths: content: application/json: schema: - additionalProperties: {} type: object - description: OK + description: OpenVEX document in JSON format security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image manifest fetch + summary: Get VEX in OpenVEX JSON format tags: - - Dependency Firewall - head: + - Artifacts + /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json: + get: parameters: - - description: dependency proxy secret + - description: Organization slug in: path - name: secret + name: organization + required: true schema: type: string - - description: registry hostname + - description: Project slug in: path - name: registry + name: projectSlug required: true schema: type: string - - description: image namespace + - description: Asset slug in: path - name: namespace + name: assetSlug + required: true schema: type: string - - description: image name + - description: Asset version slug in: path - name: image + name: assetVersionSlug required: true schema: type: string - - description: tag or digest + - description: Artifact name in: path - name: reference + name: artifactName required: true schema: type: string @@ -21819,43 +20982,45 @@ paths: content: application/json: schema: - additionalProperties: {} type: object - description: OK + description: CycloneDX BOM in JSON format security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image manifest fetch + summary: Get SBOM in JSON format tags: - - Dependency Firewall - /v2/{registry}/{image}/referrers/{digest}: + - Artifacts + /public/{assetID}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json: get: parameters: - - description: dependency proxy secret + - description: Organization slug in: path - name: secret + name: organization + required: true schema: type: string - - description: registry hostname + - description: Project slug in: path - name: registry + name: projectSlug required: true schema: type: string - - description: image namespace + - description: Asset slug in: path - name: namespace + name: assetSlug + required: true schema: type: string - - description: image name + - description: Asset version slug in: path - name: image + name: assetVersionSlug required: true schema: type: string - - description: subject digest + - description: Artifact name in: path - name: digest + name: artifactName required: true schema: type: string @@ -21864,37 +21029,27 @@ paths: content: application/json: schema: - additionalProperties: {} type: object - description: OK + description: CycloneDX VEX in JSON format security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image referrers list + summary: Get VEX in JSON format tags: - - Dependency Firewall - /v2/{registry}/{image}/tags/list: + - Artifacts + /renovate/recommendation: get: parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: registry hostname - in: path - name: registry + - description: Package name + in: query + name: packageName required: true schema: type: string - - description: image namespace - in: path - name: namespace - schema: - type: string - - description: image name - in: path - name: image + - description: Current version value + in: query + name: currentValue required: true schema: type: string @@ -21903,44 +21058,30 @@ paths: content: application/json: schema: - additionalProperties: {} - type: object + $ref: '#/components/schemas/dtos.Recommendation' description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy OCI image tags list + summary: Get recommended fixed version for a package tags: - - Dependency Firewall - /v2/{registry}/{namespace}/{image}/blobs/{digest}: + - Vulnerabilities + /resolve: get: + description: Resolves an organization, project or asset UUID to the slugs the + frontend needs to build a human readable URL. Exactly one of the query parameters + must be set. parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: registry hostname - in: path - name: registry - required: true - schema: - type: string - - description: image namespace - in: path - name: namespace + - description: Organization ID + in: query + name: orgId schema: type: string - - description: image name - in: path - name: image - required: true + - description: Project ID + in: query + name: projectId schema: type: string - - description: blob digest - in: path - name: digest - required: true + - description: Asset ID + in: query + name: assetId schema: type: string responses: @@ -21948,228 +21089,230 @@ paths: content: application/json: schema: - type: file + $ref: '#/components/schemas/dtos.PermalinkResponse' description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image blob download + summary: Resolve a permalink tags: - - Dependency Firewall - head: + - Organizations + /sarif-scan: + post: + deprecated: true parameters: - - description: dependency proxy secret - in: path - name: secret + - description: Asset version name + in: header + name: X-Asset-Ref schema: type: string - - description: registry hostname - in: path - name: registry - required: true + - description: Tag flag + in: header + name: X-Tag schema: type: string - - description: image namespace - in: path - name: namespace + - description: Default branch + in: header + name: X-Asset-Default-Branch schema: type: string - - description: image name - in: path - name: image + - description: Scanner ID + in: header + name: X-Scanner required: true schema: type: string - - description: blob digest - in: path - name: digest + - description: Asset name as // + in: header + name: X-Asset-Name required: true schema: type: string + requestBody: + content: + text/plain: + schema: + title: body + type: object + description: SARIF scan result + required: true responses: "200": content: application/json: schema: - type: file + $ref: '#/components/schemas/dtos.FirstPartyScanResponse' description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image blob download + summary: Scan for first-party vulnerabilities tags: - - Dependency Firewall - /v2/{registry}/{namespace}/{image}/manifests/{reference}: - get: + - Scanning + /sarif-scan-unauthenticated: + post: + deprecated: true parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: registry hostname - in: path - name: registry - required: true - schema: - type: string - - description: image namespace - in: path - name: namespace - schema: - type: string - - description: image name - in: path - name: image + - description: Scanner ID + in: header + name: X-Scanner required: true schema: type: string - - description: tag or digest - in: path - name: reference + requestBody: + content: + text/plain: + schema: + title: body + type: object + description: SARIF scan result required: true - schema: - type: string responses: "200": content: application/json: schema: - additionalProperties: {} - type: object + $ref: '#/components/schemas/dtos.FirstPartyScanResponse' description: OK - security: - - PATAuth: [] - - BearerAuth: [] - summary: Proxy OCI image manifest fetch + summary: Scan for first-party vulnerabilities without authentication (scan-only, + results are not saved) tags: - - Dependency Firewall - head: + - Scanning + /scan: + post: + deprecated: true parameters: - - description: dependency proxy secret - in: path - name: secret + - description: Asset version name + in: header + name: X-Asset-Ref schema: type: string - - description: registry hostname - in: path - name: registry - required: true + - description: Artifact name + in: header + name: X-Artifact-Name schema: type: string - - description: image namespace - in: path - name: namespace + - description: Tag flag + in: header + name: X-Tag schema: type: string - - description: image name - in: path - name: image - required: true + - description: Default branch + in: header + name: X-Asset-Default-Branch schema: type: string - - description: tag or digest - in: path - name: reference + - description: Origin + in: header + name: X-Origin + schema: + type: string + - description: Scanner ID + in: header + name: X-Scanner + schema: + type: string + - description: Asset name as // + in: header + name: X-Asset-Name required: true schema: type: string + requestBody: + content: + text/plain: + schema: + title: body + type: object + description: CycloneDX SBOM + required: true responses: "200": content: application/json: schema: - additionalProperties: {} - type: object + $ref: '#/components/schemas/dtos.ScanResponse' description: OK security: + - CookieAuth: [] - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image manifest fetch + summary: Scan for dependency vulnerabilities tags: - - Dependency Firewall - /v2/{registry}/{namespace}/{image}/referrers/{digest}: - get: - parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: registry hostname - in: path - name: registry - required: true - schema: - type: string - - description: image namespace - in: path - name: namespace - schema: - type: string - - description: image name - in: path - name: image - required: true - schema: - type: string - - description: subject digest - in: path - name: digest + - Scanning + /scan-unauthenticated: + post: + deprecated: true + requestBody: + content: + text/plain: + schema: + title: body + type: object + description: CycloneDX SBOM required: true - schema: - type: string responses: "200": content: application/json: schema: - additionalProperties: {} + $ref: '#/components/schemas/dtos.ScanResponse' + description: OK + summary: Scan for dependency vulnerabilities without authentication (scan-only, + results are not saved) + tags: + - Scanning + /trigger-sync: + get: + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/dtos.OrgDTO' + type: array + description: OK + security: + - CookieAuth: [] + - PATAuth: [] + summary: Trigger a sync for the current session's org + tags: + - Organizations + /v2: + head: + responses: + "200": + content: + application/json: + schema: + additionalProperties: + type: string type: object description: OK security: - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image referrers list + summary: OCI Distribution Spec v2 version check tags: - Dependency Firewall - /v2/{registry}/{namespace}/{image}/tags/list: + /v2/: get: - parameters: - - description: dependency proxy secret - in: path - name: secret - schema: - type: string - - description: registry hostname - in: path - name: registry - required: true - schema: - type: string - - description: image namespace - in: path - name: namespace - schema: - type: string - - description: image name - in: path - name: image - required: true - schema: - type: string responses: "200": content: application/json: schema: - additionalProperties: {} + additionalProperties: + type: string type: object description: OK security: - PATAuth: [] - BearerAuth: [] - summary: Proxy OCI image tags list + summary: OCI Distribution Spec v2 version check tags: - Dependency Firewall /v2/{secret}/{registry}/{namespace}/{image}/blobs/{digest}: @@ -22178,6 +21321,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22221,6 +21365,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22265,6 +21410,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22309,6 +21455,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22354,6 +21501,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22399,6 +21547,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22438,6 +21587,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22481,6 +21631,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22525,6 +21676,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22569,6 +21721,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22614,6 +21767,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname @@ -22659,6 +21813,7 @@ paths: - description: dependency proxy secret in: path name: secret + required: true schema: type: string - description: registry hostname diff --git a/router/dependency_proxy_router.go b/router/dependency_proxy_router.go index cb27abd4e..bc9c29e2a 100644 --- a/router/dependency_proxy_router.go +++ b/router/dependency_proxy_router.go @@ -63,17 +63,7 @@ func NewDependencyProxyRouter( composerController *dependencyfirewall.ComposerDependencyProxyController, debController *dependencyfirewall.DebDependencyProxyController, ) DependencyProxyRouter { - group := apiV1Group.Group.Group("/dependency-proxy") - - registerNPMRoutes(group, npmController) - registerGoRoutes(group, goController) - registerPyPIRoutes(group, pythonController) - registerMavenRoutes(group, mavenController) - registerComposerRoutes(group, composerController) - registerDebRoutes(group, debController) - - // Secret-scoped routes (used without DevGuard authentication) - secretGroup := group.Group("/:secret") + secretGroup := apiV1Group.Group.Group("/dependency-proxy/:secret") registerNPMRoutes(secretGroup, npmController) registerGoRoutes(secretGroup, goController) @@ -82,5 +72,5 @@ func NewDependencyProxyRouter( registerComposerRoutes(secretGroup, composerController) registerDebRoutes(secretGroup, debController) - return DependencyProxyRouter{Group: group} + return DependencyProxyRouter{Group: secretGroup} } diff --git a/router/oci_registry_router.go b/router/oci_registry_router.go index d7b07e1e0..6322bde01 100644 --- a/router/oci_registry_router.go +++ b/router/oci_registry_router.go @@ -16,28 +16,14 @@ package router import ( - "os" - "github.com/l3montree-dev/devguard/cmd/devguard/api" "github.com/l3montree-dev/devguard/controllers/dependencyfirewall" "github.com/labstack/echo/v4" ) -// ociPublicProxyEnabled reports whether the unauthenticated /v2//... -// routes should be registered. Defaults to enabled; set -// DEPENDENCY_PROXY_OCI_PUBLIC_ENABLED=false to lock the proxy down to -// secret-scoped routes only. -func ociPublicProxyEnabled() bool { - return os.Getenv("DEPENDENCY_PROXY_OCI_PUBLIC_ENABLED") != "false" -} - // OCIRegistryRouter exposes the OCI Distribution Spec v2 API at the root /v2/ path // so that standard Docker clients can pull images without any special configuration. // -// Unauthenticated (no custom firewall rules applied): -// -// docker pull /docker.io/library/nginx:latest -// // Secret-scoped (custom rules enforced; MinReleaseAge does not apply to OCI images, // registries expose no reliable publish time): // @@ -46,13 +32,7 @@ func ociPublicProxyEnabled() bool { // Docker resolves these as registry= and sends: // // GET /v2/ (version check) -// GET /v2/docker.io/library/nginx/manifests/latest (unauthenticated) // GET /v2//docker.io/library/nginx/manifests/latest (secret-scoped) -// -// Routing note: to avoid ambiguity, no-secret routes cover 1- and 2-segment image -// names while secret routes cover 2- and 3-segment image names (shifted by one). -// In practice this means all real Docker Hub and ghcr.io images (e.g. -// library/nginx, org/repo) work in both modes. type OCIRegistryRouter struct { *echo.Group } @@ -64,29 +44,6 @@ func NewOCIRegistryRouter(srv api.Server, ociController *dependencyfirewall.OCID v2.GET("/", ociController.ProxyOCIVersionCheck) v2.HEAD("/", ociController.ProxyOCIVersionCheck) - // ── Unauthenticated routes ────────────────────────────────────────────── - // No secret in path; GetDependencyProxyConfigs returns empty config (no rules). - // Malicious-package and path-traversal checks still run. - // Operators can disable these routes entirely via - // DEPENDENCY_PROXY_OCI_PUBLIC_ENABLED=false. - if ociPublicProxyEnabled() { - // 1-segment image: docker.io/nginx - v2.GET("/:registry/:image/manifests/:reference/", ociController.ProxyOCIManifest) - v2.HEAD("/:registry/:image/manifests/:reference/", ociController.ProxyOCIManifest) - v2.GET("/:registry/:image/blobs/:digest/", ociController.ProxyOCIBlob) - v2.HEAD("/:registry/:image/blobs/:digest/", ociController.ProxyOCIBlob) - v2.GET("/:registry/:image/tags/list/", ociController.ProxyOCITagsList) - v2.GET("/:registry/:image/referrers/:digest/", ociController.ProxyOCIReferrers) - - // 2-segment image: docker.io/library/nginx - v2.GET("/:registry/:namespace/:image/manifests/:reference/", ociController.ProxyOCIManifest) - v2.HEAD("/:registry/:namespace/:image/manifests/:reference/", ociController.ProxyOCIManifest) - v2.GET("/:registry/:namespace/:image/blobs/:digest/", ociController.ProxyOCIBlob) - v2.HEAD("/:registry/:namespace/:image/blobs/:digest/", ociController.ProxyOCIBlob) - v2.GET("/:registry/:namespace/:image/tags/list/", ociController.ProxyOCITagsList) - v2.GET("/:registry/:namespace/:image/referrers/:digest/", ociController.ProxyOCIReferrers) - } - // ── Secret-scoped routes ──────────────────────────────────────────────── // Secret is the first path segment; custom firewall rules are loaded for // the matching asset / project / organization. diff --git a/router/oci_registry_router_test.go b/router/oci_registry_router_test.go index 8e6ab2d29..f6271aa0d 100644 --- a/router/oci_registry_router_test.go +++ b/router/oci_registry_router_test.go @@ -31,55 +31,23 @@ const ( pathVersionCheck = "/v2/" ) -func TestOCIRegistryRouterPublicKillSwitch(t *testing.T) { +func TestOCIRegistryRouterOnlySecretScopedRoutes(t *testing.T) { // A nil-embedded controller is fine — Echo stores method values on route // registration, the handlers themselves are never invoked here. - ctrl := &dependencyfirewall.OCIDependencyProxyController{} + paths := registerRoutesAndList(&dependencyfirewall.OCIDependencyProxyController{}) - t.Run("default registers both unauth and secret-scoped routes", func(t *testing.T) { - t.Setenv("DEPENDENCY_PROXY_OCI_PUBLIC_ENABLED", "") - paths := registerRoutesAndList(ctrl) - - if !slices.Contains(paths, pathUnauthManifest1Seg) { - t.Error("expected 1-segment unauth manifest route to be registered") - } - if !slices.Contains(paths, pathUnauthManifest2Seg) { - t.Error("expected 2-segment unauth manifest route to be registered") - } - if !slices.Contains(paths, pathSecretManifest2Seg) { - t.Error("expected secret-scoped route to be registered") - } - if !slices.Contains(paths, pathVersionCheck) { - t.Error("expected version check route to be registered") - } - }) - - t.Run("explicit true behaves like default", func(t *testing.T) { - t.Setenv("DEPENDENCY_PROXY_OCI_PUBLIC_ENABLED", "true") - paths := registerRoutesAndList(ctrl) - - if !slices.Contains(paths, pathUnauthManifest1Seg) { - t.Error("expected unauth route to be registered when explicit true") - } - }) - - t.Run("kill switch removes unauth routes but keeps secret-scoped", func(t *testing.T) { - t.Setenv("DEPENDENCY_PROXY_OCI_PUBLIC_ENABLED", "false") - paths := registerRoutesAndList(ctrl) - - if slices.Contains(paths, pathUnauthManifest1Seg) { - t.Error("expected 1-segment unauth route to NOT be registered when killswitch active") - } - if slices.Contains(paths, pathUnauthManifest2Seg) { - t.Error("expected 2-segment unauth route to NOT be registered when killswitch active") - } - if !slices.Contains(paths, pathSecretManifest2Seg) { - t.Error("expected secret-scoped route to remain registered") - } - if !slices.Contains(paths, pathVersionCheck) { - t.Error("expected version check route to remain registered") - } - }) + if slices.Contains(paths, pathUnauthManifest1Seg) { + t.Error("expected 1-segment unauth route to NOT be registered") + } + if slices.Contains(paths, pathUnauthManifest2Seg) { + t.Error("expected 2-segment unauth route to NOT be registered") + } + if !slices.Contains(paths, pathSecretManifest2Seg) { + t.Error("expected secret-scoped route to be registered") + } + if !slices.Contains(paths, pathVersionCheck) { + t.Error("expected version check route to be registered") + } } func registerRoutesAndList(ctrl *dependencyfirewall.OCIDependencyProxyController) []string { diff --git a/tests/router_security_test.go b/tests/router_security_test.go index 1058f44c2..8c9be58a6 100644 --- a/tests/router_security_test.go +++ b/tests/router_security_test.go @@ -113,22 +113,6 @@ var routeMinLevel = map[string]shared.Role{ "GET /api/v1/dependency-proxy/:secret/pypi/packages/*": shared.RoleGuest, "GET /api/v1/dependency-proxy/:secret/pypi/simple/:package": shared.RoleGuest, "GET /api/v1/dependency-proxy/:secret/pypi/simple/:package/": shared.RoleGuest, - "GET /api/v1/dependency-proxy/go": shared.RoleGuest, - "GET /api/v1/dependency-proxy/go/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/deb/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/composer/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/maven/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/npm/:package": shared.RoleGuest, - "GET /api/v1/dependency-proxy/npm/:package/": shared.RoleGuest, - "GET /api/v1/dependency-proxy/npm/:package/-/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/npm/:scope/:name": shared.RoleGuest, - "GET /api/v1/dependency-proxy/npm/:scope/:name/": shared.RoleGuest, - "GET /api/v1/dependency-proxy/npm/:scope/:name/-/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/npm/-/*": shared.RoleGuest, - "POST /api/v1/dependency-proxy/npm/-/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/pypi/packages/*": shared.RoleGuest, - "GET /api/v1/dependency-proxy/pypi/simple/:package": shared.RoleGuest, - "GET /api/v1/dependency-proxy/pypi/simple/:package/": shared.RoleGuest, "GET /api/v1/health/": shared.RoleGuest, "GET /api/v1/info/": shared.RoleGuest, "GET /api/v1/instance-settings/": shared.RoleGuest, @@ -280,14 +264,6 @@ var routeMinLevel = map[string]shared.Role{ "GET /api/v1/vulndb/purl-inspect/:purl": shared.RoleGuest, "GET /api/v1/whoami/": shared.RoleGuest, "GET /v2/": shared.RoleGuest, - "GET /v2/:registry/:image/blobs/:digest/": shared.RoleGuest, - "GET /v2/:registry/:image/manifests/:reference/": shared.RoleGuest, - "GET /v2/:registry/:image/referrers/:digest/": shared.RoleGuest, - "GET /v2/:registry/:image/tags/list/": shared.RoleGuest, - "GET /v2/:registry/:namespace/:image/blobs/:digest/": shared.RoleGuest, - "GET /v2/:registry/:namespace/:image/manifests/:reference/": shared.RoleGuest, - "GET /v2/:registry/:namespace/:image/referrers/:digest/": shared.RoleGuest, - "GET /v2/:registry/:namespace/:image/tags/list/": shared.RoleGuest, "GET /v2/:secret/:registry/:namespace/:image/blobs/:digest/": shared.RoleGuest, "GET /v2/:secret/:registry/:namespace/:image/manifests/:reference/": shared.RoleGuest, "GET /v2/:secret/:registry/:namespace/:image/referrers/:digest/": shared.RoleGuest, @@ -297,10 +273,6 @@ var routeMinLevel = map[string]shared.Role{ "GET /v2/:secret/:registry/:ns1/:ns2/:image/referrers/:digest/": shared.RoleGuest, "GET /v2/:secret/:registry/:ns1/:ns2/:image/tags/list/": shared.RoleGuest, "HEAD /v2/": shared.RoleGuest, - "HEAD /v2/:registry/:image/blobs/:digest/": shared.RoleGuest, - "HEAD /v2/:registry/:image/manifests/:reference/": shared.RoleGuest, - "HEAD /v2/:registry/:namespace/:image/blobs/:digest/": shared.RoleGuest, - "HEAD /v2/:registry/:namespace/:image/manifests/:reference/": shared.RoleGuest, "HEAD /v2/:secret/:registry/:namespace/:image/blobs/:digest/": shared.RoleGuest, "HEAD /v2/:secret/:registry/:namespace/:image/manifests/:reference/": shared.RoleGuest, "HEAD /v2/:secret/:registry/:ns1/:ns2/:image/blobs/:digest/": shared.RoleGuest, @@ -320,7 +292,6 @@ var routeMinLevel = map[string]shared.Role{ "POST /api/v1/admin/daemons/vulndb/trigger/": shared.RoleOwner, "POST /api/v1/attestations/": shared.RoleMember, "POST /api/v1/dependency-proxy/:secret/npm/*": shared.RoleGuest, - "POST /api/v1/dependency-proxy/npm/*": shared.RoleGuest, "POST /api/v1/organizations/": shared.RoleMember, "POST /api/v1/organizations/:organization/compliance-postures/:frameworkControlID/": shared.RoleAdmin, "POST /api/v1/organizations/:organization/compliance-postures/:frameworkControlID/components/:complianceComponentID/": shared.RoleAdmin, diff --git a/tests/test-go-project/test-proxy.sh b/tests/test-go-project/test-proxy.sh index 566e1692e..d0655f933 100755 --- a/tests/test-go-project/test-proxy.sh +++ b/tests/test-go-project/test-proxy.sh @@ -13,4 +13,4 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -GOPATH=/tmp/go-proxy-test/gopath GOMODCACHE=/tmp/go-proxy-test/pkg/mod GOPROXY="http://localhost:8080/api/v1/dependency-proxy/go" go get github.com/fake-org/malicious-package \ No newline at end of file +GOPATH=/tmp/go-proxy-test/gopath GOMODCACHE=/tmp/go-proxy-test/pkg/mod GOPROXY="http://localhost:8080/api/v1/dependency-proxy/${DEVGUARD_PROXY_SECRET:?set DEVGUARD_PROXY_SECRET}/go" go get github.com/fake-org/malicious-package \ No newline at end of file diff --git a/tests/test-npm-project/.npmrc b/tests/test-npm-project/.npmrc index 45e4675e1..7e9b12a06 100644 --- a/tests/test-npm-project/.npmrc +++ b/tests/test-npm-project/.npmrc @@ -1,3 +1,3 @@ ignore-scripts=true -registry=http://localhost:8080/api/v1/dependency-proxy/npm +registry=http://localhost:8080/api/v1/dependency-proxy/${DEVGUARD_PROXY_SECRET}/npm strict-ssl=false \ No newline at end of file diff --git a/tests/test-pypi-project/test-proxy.sh b/tests/test-pypi-project/test-proxy.sh index 0e5a73dac..b36b42ef1 100755 --- a/tests/test-pypi-project/test-proxy.sh +++ b/tests/test-pypi-project/test-proxy.sh @@ -17,4 +17,4 @@ python3 -m venv venv source venv/bin/activate -PIP_INDEX_URL="http://localhost:8080/api/v1/dependency-proxy/pypi/simple" PIP_TRUSTED_HOST="localhost" python3 -m pip install -r requirements.txt \ No newline at end of file +PIP_INDEX_URL="http://localhost:8080/api/v1/dependency-proxy/${DEVGUARD_PROXY_SECRET:?set DEVGUARD_PROXY_SECRET}/pypi/simple" PIP_TRUSTED_HOST="localhost" python3 -m pip install -r requirements.txt \ No newline at end of file