diff --git a/controllers/artifact_controller.go b/controllers/artifact_controller.go index 63405703..f9259d9a 100644 --- a/controllers/artifact_controller.go +++ b/controllers/artifact_controller.go @@ -438,7 +438,8 @@ func (c *ArtifactController) UpdateArtifact(ctx shared.Context) error { // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Param artifactName path string true "Artifact name" -// @Success 200 {object} object +// @Produce application/json +// @Success 200 {object} object "CycloneDX BOM in JSON format" // @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.json/ [get] func (c *ArtifactController) SBOMJSON(ctx shared.Context) error { assetVersion := shared.GetAssetVersion(ctx) @@ -470,7 +471,8 @@ func (c *ArtifactController) SBOMJSON(ctx shared.Context) error { // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Param artifactName path string true "Artifact name" -// @Success 200 {object} object +// @Produce application/xml +// @Success 200 {string} string "CycloneDX BOM in XML format" // @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.xml/ [get] func (c *ArtifactController) SBOMXML(ctx shared.Context) error { assetVersion := shared.GetAssetVersion(ctx) @@ -483,6 +485,7 @@ func (c *ArtifactController) SBOMXML(ctx shared.Context) error { if err := sbom.ScopeToArtifact(artifact.ArtifactName); err != nil { return echo.NewHTTPError(500, "could not scope sbom to artifact").WithInternal(err) } + ctx.Response().Header().Set("Content-Type", "application/xml") encoder := cdx.NewBOMEncoder(ctx.Response().Writer, cdx.BOMFileFormatXML).SetPretty(true).SetEscapeHTML(false) return encoder.Encode(sbom.ToCycloneDX(ctxToBOMMetadata(ctx))) } @@ -496,7 +499,8 @@ func (c *ArtifactController) SBOMXML(ctx shared.Context) error { // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Param artifactName path string true "Artifact name" -// @Success 200 {object} object +// @Produce application/xml +// @Success 200 {string} string "CycloneDX VEX in XML format" // @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.xml/ [get] func (c *ArtifactController) VEXXML(ctx shared.Context) error { sbom, err := c.buildVeX(ctx) @@ -504,6 +508,7 @@ func (c *ArtifactController) VEXXML(ctx shared.Context) error { return err } + ctx.Response().Header().Set("Content-Type", "application/xml") encoder := cdx.NewBOMEncoder(ctx.Response().Writer, cdx.BOMFileFormatXML).SetPretty(true).SetEscapeHTML(false) return encoder.Encode(sbom.ToCycloneDX(ctxToBOMMetadata(ctx))) @@ -518,7 +523,8 @@ func (c *ArtifactController) VEXXML(ctx shared.Context) error { // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Param artifactName path string true "Artifact name" -// @Success 200 {object} object +// @Produce application/json +// @Success 200 {object} object "CycloneDX VEX in JSON format" // @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vex.json/ [get] func (c *ArtifactController) VEXJSON(ctx shared.Context) error { sbom, err := c.buildVeX(ctx) @@ -541,7 +547,8 @@ func (c *ArtifactController) VEXJSON(ctx shared.Context) error { // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Param artifactName path string true "Artifact name" -// @Success 200 {object} object +// @Produce application/json +// @Success 200 {object} object "OpenVEX document in JSON format" // @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/openvex.json/ [get] func (c *ArtifactController) OpenVEXJSON(ctx shared.Context) error { vex, err := c.buildOpenVeX(ctx) @@ -595,7 +602,8 @@ func (c *ArtifactController) buildVeX(ctx shared.Context) (*normalize.SBOMGraph, // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Param artifactName path string true "Artifact name" -// @Success 200 {object} object +// @Produce application/pdf +// @Success 200 {string} string "Vulnerability report as PDF" // @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/vulnerability-report.pdf/ [get] func (c *ArtifactController) BuildVulnerabilityReportPDF(ctx shared.Context) error { assetVersion := shared.GetAssetVersion(ctx) @@ -816,7 +824,8 @@ func (c *ArtifactController) BuildVulnerabilityReportPDF(ctx shared.Context) err // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Param artifactName path string true "Artifact name" -// @Success 200 {object} object +// @Produce application/pdf +// @Success 200 {string} string "SBOM as PDF" // @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/artifacts/{artifactName}/sbom.pdf/ [get] func (c *ArtifactController) BuildPDFFromSBOM(ctx shared.Context) error { assetVersion := shared.GetAssetVersion(ctx) diff --git a/controllers/asset_controller.go b/controllers/asset_controller.go index f2688b30..ee5b2a69 100644 --- a/controllers/asset_controller.go +++ b/controllers/asset_controller.go @@ -378,6 +378,17 @@ func (a *AssetController) Update(ctx shared.Context) error { return ctx.JSON(200, transformer.AssetModelToDetailsWithSecretsDTO(asset, members)) } +// @Summary Get asset config file +// @Tags Assets +// @Security CookieAuth +// @Security PATAuth +// @Param organization path string true "Organization slug" +// @Param projectSlug path string true "Project slug" +// @Param assetSlug path string true "Asset slug" +// @Param config-file path string true "Config file ID" +// @Produce text/plain +// @Success 200 {string} string "Config file content" +// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/config-files/{config-file}/ [get] func (a *AssetController) GetConfigFile(ctx shared.Context) error { organization := shared.GetOrg(ctx) project := shared.GetProject(ctx) @@ -399,6 +410,18 @@ func (a *AssetController) GetConfigFile(ctx shared.Context) error { return ctx.String(200, configContent.(string)) } +// @Summary Update asset config file +// @Tags Assets +// @Security CookieAuth +// @Security PATAuth +// @Param organization path string true "Organization slug" +// @Param projectSlug path string true "Project slug" +// @Param assetSlug path string true "Asset slug" +// @Param config-file path string true "Config file ID" +// @Param body body string true "Config file content" +// @Produce text/plain +// @Success 200 {string} string "Updated config file content" +// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/config-files/{config-file}/ [put] func (a *AssetController) UpdateConfigFile(ctx shared.Context) error { asset := shared.GetAsset(ctx) configID := ctx.Param("config-file") diff --git a/controllers/asset_version_controller.go b/controllers/asset_version_controller.go index ddfd9cc3..830a8bae 100644 --- a/controllers/asset_version_controller.go +++ b/controllers/asset_version_controller.go @@ -64,7 +64,7 @@ func NewAssetVersionController( // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Success 200 {object} dtos.AssetVersionDTO -// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug} [get] +// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/ [get] func (a *AssetVersionController) Read(ctx shared.Context) error { assetVersion := shared.GetAssetVersion(ctx) return ctx.JSON(200, transformer.AssetVersionModelToDTO(assetVersion)) @@ -79,7 +79,7 @@ func (a *AssetVersionController) Read(ctx shared.Context) error { // @Param assetSlug path string true "Asset slug" // @Param body body object{name=string,tag=bool,defaultBranch=bool} true "Request body" // @Success 201 {object} dtos.AssetVersionDTO -// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs [post] +// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/ [post] func (a *AssetVersionController) Create(ctx shared.Context) error { asset := shared.GetAsset(ctx) @@ -115,7 +115,7 @@ func (a *AssetVersionController) Create(ctx shared.Context) error { // @Param assetSlug path string true "Asset slug" // @Param assetVersionSlug path string true "Asset version slug" // @Success 200 -// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug} [delete] +// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/ [delete] func (a *AssetVersionController) Delete(ctx shared.Context) error { assetVersion := shared.GetAssetVersion(ctx) //Get the asset provided in the context / URL err := a.assetVersionRepository.Delete(ctx.Request().Context(), nil, &assetVersion) //Call delete on the returned assetVersion @@ -133,8 +133,8 @@ func (a *AssetVersionController) Delete(ctx shared.Context) error { // @Param organization path string true "Organization slug" // @Param projectSlug path string true "Project slug" // @Param assetSlug path string true "Asset slug" -// @Success 200 {array} []dtos.AssetVersionDTO -// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs [get] +// @Success 200 {array} dtos.AssetVersionDTO +// @Router /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/ [get] func (a *AssetVersionController) GetAssetVersionsByAssetID(ctx shared.Context) error { asset := shared.GetAsset(ctx) diff --git a/controllers/org_controller.go b/controllers/org_controller.go index 04fe8b41..547d060d 100644 --- a/controllers/org_controller.go +++ b/controllers/org_controller.go @@ -372,8 +372,9 @@ func (controller *OrgController) Metrics(ctx shared.Context) error { // @Security PATAuth // @Param organization path string true "Organization slug" // @Param config-file path string true "Config file ID" -// @Success 200 {string} string -// @Router /organizations/{organization}/config-files/{config-file} [get] +// @Produce text/plain +// @Success 200 {string} string "Config file content" +// @Router /organizations/{organization}/config-files/{config-file}/ [get] func (controller *OrgController) GetConfigFile(ctx shared.Context) error { organization := shared.GetOrg(ctx) configID := ctx.Param("config-file") @@ -392,8 +393,9 @@ func (controller *OrgController) GetConfigFile(ctx shared.Context) error { // @Param organization path string true "Organization slug" // @Param config-file path string true "Config file ID" // @Param body body string true "Config file content" -// @Success 200 {string} string -// @Router /organizations/{organization}/config-files/{config-file} [put] +// @Produce text/plain +// @Success 200 {string} string "Updated config file content" +// @Router /organizations/{organization}/config-files/{config-file}/ [put] func (controller *OrgController) UpdateConfigFile(ctx shared.Context) error { organization := shared.GetOrg(ctx) configID := ctx.Param("config-file") diff --git a/controllers/project_controller.go b/controllers/project_controller.go index aafff632..1de654d2 100644 --- a/controllers/project_controller.go +++ b/controllers/project_controller.go @@ -429,6 +429,16 @@ func (ProjectController *ProjectController) Update(c shared.Context) error { return c.JSON(200, resp) } +// @Summary Get project config file +// @Tags Projects +// @Security CookieAuth +// @Security PATAuth +// @Param organization path string true "Organization slug" +// @Param projectSlug path string true "Project slug" +// @Param config-file path string true "Config file ID" +// @Produce text/plain +// @Success 200 {string} string "Config file content" +// @Router /organizations/{organization}/projects/{projectSlug}/config-files/{config-file}/ [get] func (ProjectController *ProjectController) GetConfigFile(ctx shared.Context) error { organization := shared.GetOrg(ctx) project := shared.GetProject(ctx) @@ -445,6 +455,17 @@ func (ProjectController *ProjectController) GetConfigFile(ctx shared.Context) er return ctx.String(200, configContent.(string)) } +// @Summary Update project config file +// @Tags Projects +// @Security CookieAuth +// @Security PATAuth +// @Param organization path string true "Organization slug" +// @Param projectSlug path string true "Project slug" +// @Param config-file path string true "Config file ID" +// @Param body body string true "Config file content" +// @Produce text/plain +// @Success 200 {string} string "Updated config file content" +// @Router /organizations/{organization}/projects/{projectSlug}/config-files/{config-file}/ [put] func (ProjectController *ProjectController) UpdateConfigFile(ctx shared.Context) error { project := shared.GetProject(ctx) configID := ctx.Param("config-file") diff --git a/docs/swagger.json b/docs/swagger.json index 41fcece6..df3f865f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -4426,7 +4426,7 @@ ] } }, - "/organizations/{organization}/config-files/{config-file}": { + "/organizations/{organization}/config-files/{config-file}/": { "get": { "parameters": [ { @@ -4451,13 +4451,13 @@ "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } } }, - "description": "OK" + "description": "Config file content" } }, "security": [ @@ -4509,13 +4509,13 @@ "responses": { "200": { "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } } }, - "description": "OK" + "description": "Updated config file content" } }, "security": [ @@ -5360,6 +5360,148 @@ ] } }, + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/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" + } + }, + { + "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": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Config file content" + } + }, + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + } + ], + "summary": "Get asset config file", + "tags": [ + "Assets" + ] + }, + "put": { + "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": "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": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Updated config file content" + } + }, + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + } + ], + "summary": "Update asset config file", + "tags": [ + "Assets" + ] + } + }, "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/changes.csv": { "get": { "parameters": [ @@ -5602,7 +5744,7 @@ ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/": { "get": { "parameters": [ { @@ -5639,10 +5781,7 @@ "application/json": { "schema": { "items": { - "items": { - "$ref": "#/components/schemas/dtos.AssetVersionDTO" - }, - "type": "array" + "$ref": "#/components/schemas/dtos.AssetVersionDTO" }, "type": "array" } @@ -5743,7 +5882,7 @@ ] } }, - "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}": { + "/organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/": { "delete": { "parameters": [ { @@ -6155,7 +6294,7 @@ } } }, - "description": "OK" + "description": "OpenVEX document in JSON format" } }, "security": [ @@ -6230,7 +6369,7 @@ } } }, - "description": "OK" + "description": "CycloneDX BOM in JSON format" } }, "security": [ @@ -6299,13 +6438,13 @@ "responses": { "200": { "content": { - "application/json": { + "application/pdf": { "schema": { - "type": "object" + "type": "string" } } }, - "description": "OK" + "description": "SBOM as PDF" } }, "security": [ @@ -6374,13 +6513,13 @@ "responses": { "200": { "content": { - "application/json": { + "application/xml": { "schema": { - "type": "object" + "type": "string" } } }, - "description": "OK" + "description": "CycloneDX BOM in XML format" } }, "security": [ @@ -6455,7 +6594,7 @@ } } }, - "description": "OK" + "description": "CycloneDX VEX in JSON format" } }, "security": [ @@ -6524,13 +6663,13 @@ "responses": { "200": { "content": { - "application/json": { + "application/xml": { "schema": { - "type": "object" + "type": "string" } } }, - "description": "OK" + "description": "CycloneDX VEX in XML format" } }, "security": [ @@ -6599,13 +6738,13 @@ "responses": { "200": { "content": { - "application/json": { + "application/pdf": { "schema": { - "type": "object" + "type": "string" } } }, - "description": "OK" + "description": "Vulnerability report as PDF" } }, "security": [ @@ -8183,6 +8322,130 @@ ] } }, + "/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" + } + }, + { + "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" + } + }, + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + } + ], + "summary": "Get project config file", + "tags": [ + "Projects" + ] + }, + "put": { + "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": "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": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Updated config file content" + } + }, + "security": [ + { + "CookieAuth": [] + }, + { + "PATAuth": [] + } + ], + "summary": "Update project config file", + "tags": [ + "Projects" + ] + } + }, "/organizations/{organization}/projects/{projectSlug}/members": { "get": { "parameters": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 457c059c..84f4bcb7 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -2981,7 +2981,7 @@ paths: summary: Update organization tags: - Organizations - /organizations/{organization}/config-files/{config-file}: + /organizations/{organization}/config-files/{config-file}/: get: parameters: - description: Organization slug @@ -2999,10 +2999,10 @@ paths: responses: "200": content: - application/json: + text/plain: schema: type: string - description: OK + description: Config file content security: - CookieAuth: [] - PATAuth: [] @@ -3034,10 +3034,10 @@ paths: responses: "200": content: - application/json: + text/plain: schema: type: string - description: OK + description: Updated config file content security: - CookieAuth: [] - PATAuth: [] @@ -3535,6 +3535,93 @@ paths: summary: Update asset tags: - Assets + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/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 + - 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: + text/plain: + schema: + type: string + description: Config file content + security: + - CookieAuth: [] + - PATAuth: [] + summary: Get asset config file + tags: + - Assets + put: + 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: 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": + content: + text/plain: + schema: + type: string + description: Updated config file content + security: + - CookieAuth: [] + - PATAuth: [] + summary: Update asset config file + tags: + - Assets /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/csaf/white/{year}/{version}: get: parameters: @@ -3681,7 +3768,7 @@ paths: summary: Get CVEs with known exploits for an asset tags: - Statistics - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs: + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/: get: parameters: - description: Organization slug @@ -3708,9 +3795,7 @@ paths: application/json: schema: items: - items: - $ref: '#/components/schemas/dtos.AssetVersionDTO' - type: array + $ref: '#/components/schemas/dtos.AssetVersionDTO' type: array description: OK security: @@ -3767,7 +3852,7 @@ paths: summary: Create asset version tags: - Asset Versions - /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}: + /organizations/{organization}/projects/{projectSlug}/assets/{assetSlug}/refs/{assetVersionSlug}/: delete: parameters: - description: Organization slug @@ -4024,7 +4109,7 @@ paths: application/json: schema: type: object - description: OK + description: OpenVEX document in JSON format security: - CookieAuth: [] - PATAuth: [] @@ -4070,7 +4155,7 @@ paths: application/json: schema: type: object - description: OK + description: CycloneDX BOM in JSON format security: - CookieAuth: [] - PATAuth: [] @@ -4113,10 +4198,10 @@ paths: responses: "200": content: - application/json: + application/pdf: schema: - type: object - description: OK + type: string + description: SBOM as PDF security: - CookieAuth: [] - PATAuth: [] @@ -4159,10 +4244,10 @@ paths: responses: "200": content: - application/json: + application/xml: schema: - type: object - description: OK + type: string + description: CycloneDX BOM in XML format security: - CookieAuth: [] - PATAuth: [] @@ -4208,7 +4293,7 @@ paths: application/json: schema: type: object - description: OK + description: CycloneDX VEX in JSON format security: - CookieAuth: [] - PATAuth: [] @@ -4251,10 +4336,10 @@ paths: responses: "200": content: - application/json: + application/xml: schema: - type: object - description: OK + type: string + description: CycloneDX VEX in XML format security: - CookieAuth: [] - PATAuth: [] @@ -4297,10 +4382,10 @@ paths: responses: "200": content: - application/json: + application/pdf: schema: - type: object - description: OK + type: string + description: Vulnerability report as PDF security: - CookieAuth: [] - PATAuth: [] @@ -5265,6 +5350,81 @@ paths: summary: Scan SBOM file tags: - Scanning + /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 + - 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 + security: + - CookieAuth: [] + - PATAuth: [] + summary: Get project config file + tags: + - Projects + put: + 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: 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": + content: + text/plain: + schema: + type: string + description: Updated config file content + security: + - CookieAuth: [] + - PATAuth: [] + summary: Update project config file + tags: + - Projects /organizations/{organization}/projects/{projectSlug}/members: get: parameters: