-
Notifications
You must be signed in to change notification settings - Fork 361
chore(openapi): Add Zone Protected Asset score docs #3184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cweidenkeller
wants to merge
1
commit into
main
Choose a base branch
from
BED-8848
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+276
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
packages/go/openapi/src/paths/asset-scores.zone-protected-asset-score.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| # Copyright 2026 Specter Ops, Inc. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| parameters: | ||
| - $ref: './../parameters/header.prefer.yaml' | ||
|
|
||
| get: | ||
| operationId: GetZoneProtectedAssetScore | ||
| summary: Get zone protected asset score | ||
| description: | | ||
| Gets a per-day series describing how much of a zone is free of open findings | ||
| over the requested time range. For each day in the range, the score is the | ||
| number of objects in the zone without an open finding divided by the total | ||
| number of objects in the zone. Zones that attack path analysis does not run | ||
| against yield an empty series. | ||
| tags: | ||
| - Asset Scores | ||
| - Enterprise | ||
| parameters: | ||
| - name: environments | ||
| description: Environment IDs | ||
| in: query | ||
| required: true | ||
| schema: | ||
| type: array | ||
| items: | ||
| type: string | ||
| - name: asset_group_tag_id | ||
| description: The asset group tag id of the zone requested | ||
| in: query | ||
| required: true | ||
| schema: | ||
| type: integer | ||
| - name: start | ||
| description: Beginning datetime of range (inclusive) in RFC-3339 format; Defaults | ||
| to current datetime minus 30 days | ||
| in: query | ||
| schema: | ||
| type: string | ||
| format: date-time | ||
| - name: end | ||
| description: Ending datetime of range (exclusive) in RFC-3339 format; Defaults | ||
| to current datetime | ||
| in: query | ||
| schema: | ||
| type: string | ||
| format: date-time | ||
| responses: | ||
| 200: | ||
| description: OK | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| data: | ||
| allOf: | ||
| - $ref: './../schemas/api.response.time-window.yaml' | ||
| - type: object | ||
| properties: | ||
| environments: | ||
| type: array | ||
| description: The environment IDs the caller has access to | ||
| out of those requested | ||
| items: | ||
| type: string | ||
| asset_group_tag_id: | ||
| type: integer | ||
| description: The asset group tag id of the zone requested | ||
| data: | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| date: | ||
| type: string | ||
| format: date-time | ||
| readOnly: true | ||
| exposed_count: | ||
| type: integer | ||
| format: int64 | ||
| description: Number of objects in the zone holding an | ||
| open finding | ||
| readOnly: true | ||
| protected_count: | ||
| type: integer | ||
| format: int64 | ||
| description: Number of objects in the zone without an | ||
| open finding | ||
| readOnly: true | ||
| total_count: | ||
| type: integer | ||
| format: int64 | ||
| description: Total number of objects in the zone | ||
| readOnly: true | ||
| value: | ||
| type: number | ||
| format: double | ||
| description: The protected share of the zone, | ||
| `protected_count` divided by `total_count` | ||
| readOnly: true | ||
| 400: | ||
| $ref: './../responses/bad-request.yaml' | ||
| 401: | ||
| $ref: './../responses/unauthorized.yaml' | ||
| 403: | ||
| $ref: './../responses/forbidden.yaml' | ||
| 429: | ||
| $ref: './../responses/too-many-requests.yaml' | ||
| 500: | ||
| $ref: './../responses/internal-server-error.yaml' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: SpecterOps/BloodHound
Length of output: 1465
🏁 Script executed:
Repository: SpecterOps/BloodHound
Length of output: 8212
Add a top-level
tagsentry forAsset Scores. The tag appears only inx-tagGroups, so documentation tooling cannot render its description.🤖 Prompt for AI Agents
Source: Learnings