mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
Update cAPI to v1.2-rc4 and API to v1.3.0 (#740)
* Update competition-test-api to v1.2-rc4 * orchestrator: update API to v1.3.0
This commit is contained in:
committed by
GitHub
parent
05be3963bd
commit
60b0ae35e5
@@ -36,7 +36,7 @@ services:
|
||||
# - shared-tmp:/tmp
|
||||
|
||||
scantron:
|
||||
image: ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api:v1.2-rc1
|
||||
image: ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api:v1.2-rc4
|
||||
platform: linux/amd64
|
||||
privileged: true
|
||||
volumes:
|
||||
|
||||
@@ -30,7 +30,7 @@ global:
|
||||
pullSecrets: ["ghcr-auth"]
|
||||
competitionApiImage:
|
||||
repository: ghcr.io/aixcc-finals/example-crs-architecture/competition-test-api
|
||||
tag: v1.2-rc1
|
||||
tag: v1.2-rc4
|
||||
pullPolicy: Always
|
||||
pullSecrets: ["ghcr-auth"]
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
*.log
|
||||
docs/round_info/exhibition2_challenge_tasks.tar.gz
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# competition_api_client.FreeformApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**v1_task_task_id_freeform_post**](FreeformApi.md#v1_task_task_id_freeform_post) | **POST** /v1/task/{task_id}/freeform/ | Submit Freeform
|
||||
|
||||
|
||||
# **v1_task_task_id_freeform_post**
|
||||
> TypesFreeformResponse v1_task_task_id_freeform_post(task_id, payload)
|
||||
|
||||
Submit Freeform
|
||||
|
||||
CRSs may submit anything to this endpoint as a PoV. This is particularly useful for unharnessed challenges, but will be open for other challenges also. Freeform PoVs are not evaluated automatically.
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (BasicAuth):
|
||||
|
||||
```python
|
||||
import competition_api_client
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_response import TypesFreeformResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_submission import TypesFreeformSubmission
|
||||
from buttercup.orchestrator.competition_api_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = competition_api_client.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: BasicAuth
|
||||
configuration = competition_api_client.Configuration(
|
||||
username = os.environ["USERNAME"],
|
||||
password = os.environ["PASSWORD"]
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with competition_api_client.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = competition_api_client.FreeformApi(api_client)
|
||||
task_id = 'task_id_example' # str | Task ID
|
||||
payload = competition_api_client.TypesFreeformSubmission() # TypesFreeformSubmission | Submission Body
|
||||
|
||||
try:
|
||||
# Submit Freeform
|
||||
api_response = api_instance.v1_task_task_id_freeform_post(task_id, payload)
|
||||
print("The response of FreeformApi->v1_task_task_id_freeform_post:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling FreeformApi->v1_task_task_id_freeform_post: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**task_id** | **str**| Task ID |
|
||||
**payload** | [**TypesFreeformSubmission**](TypesFreeformSubmission.md)| Submission Body |
|
||||
|
||||
### Return type
|
||||
|
||||
[**TypesFreeformResponse**](TypesFreeformResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BasicAuth](../README.md#BasicAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | OK | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**404** | Not Found | - |
|
||||
**500** | Internal Server Error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -5,6 +5,7 @@ Welcome to the documentation page for the AIxCC Final Competition.
|
||||
## Table of Contents
|
||||
|
||||
- [Changelog](api/CHANGELOG.md#changelog)
|
||||
- [1.3.0](api/CHANGELOG.md#130)
|
||||
- [1.2.0](api/CHANGELOG.md#120)
|
||||
- [v1.1.1](api/CHANGELOG.md#v111)
|
||||
- [v1.1](api/CHANGELOG.md#v11)
|
||||
@@ -37,5 +38,19 @@ Welcome to the documentation page for the AIxCC Final Competition.
|
||||
- [General telemetry guidance](telemetry/telemetry_best_practices.md#general-telemetry-guidance)
|
||||
- [Improving the structure of OTEL data](telemetry/telemetry_best_practices.md#improving-the-structure-of-otel-data)
|
||||
- [Verifying telemetry](telemetry/telemetry_best_practices.md#verifying-telemetry)
|
||||
- [Source File Language Determination](source_language_determination)
|
||||
- [Tailnet-accessible hosted Competitor Test Server](tailscale-hosted-competitor-test-server/hosted_competitor_test_server.md#tailnet-accessible-hosted-competitor-test-server)
|
||||
- [Tailscale Management Tools](tailscale-hosted-competitor-test-server/tailscale_management_tools.md#tailscale-management-tools)
|
||||
- [Round Information](round_info/README.md#round-information)
|
||||
|
||||
- [Exhibition Round 1](round_info/exhibition-round-1.md#exhibition-round-1)
|
||||
|
||||
- [Repositories](round_info/exhibition-round-1.md#repositories)
|
||||
- [Challenge Sequencing](round_info/exhibition-round-1.md#challenge-sequencing)
|
||||
|
||||
- [Exhibition Round 2](round_info/exhibition-round-2.md#exhibition-round-2)
|
||||
- [Repositories](round_info/exhibition-round-2.md#repositories)
|
||||
- [Sequencing](round_info/exhibition-round-2.md#sequencing)
|
||||
- [Notes](round_info/exhibition-round-2.md#notes)
|
||||
|
||||
- [LLM Models](llm-models/README.md#llm-providers-and-models)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# competition_api_client.RequestApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**v1_request_delta_post**](RequestApi.md#v1_request_delta_post) | **POST** /v1/request/delta/ | Send a delta task to the source of this request
|
||||
|
||||
|
||||
# **v1_request_delta_post**
|
||||
> TypesMessage v1_request_delta_post(payload)
|
||||
|
||||
Send a delta task to the source of this request
|
||||
|
||||
Send a delta task to the source of this request
|
||||
|
||||
### Example
|
||||
|
||||
* Basic Authentication (BasicAuth):
|
||||
|
||||
```python
|
||||
import competition_api_client
|
||||
from buttercup.orchestrator.competition_api_client.models.types_message import TypesMessage
|
||||
from buttercup.orchestrator.competition_api_client.models.types_request_submission import TypesRequestSubmission
|
||||
from buttercup.orchestrator.competition_api_client.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to http://localhost
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = competition_api_client.Configuration(
|
||||
host = "http://localhost"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure HTTP basic authorization: BasicAuth
|
||||
configuration = competition_api_client.Configuration(
|
||||
username = os.environ["USERNAME"],
|
||||
password = os.environ["PASSWORD"]
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with competition_api_client.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = competition_api_client.RequestApi(api_client)
|
||||
payload = competition_api_client.TypesRequestSubmission() # TypesRequestSubmission | Submission Body
|
||||
|
||||
try:
|
||||
# Send a delta task to the source of this request
|
||||
api_response = api_instance.v1_request_delta_post(payload)
|
||||
print("The response of RequestApi->v1_request_delta_post:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling RequestApi->v1_request_delta_post: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**payload** | [**TypesRequestSubmission**](TypesRequestSubmission.md)| Submission Body |
|
||||
|
||||
### Return type
|
||||
|
||||
[**TypesMessage**](TypesMessage.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BasicAuth](../README.md#BasicAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | OK | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**404** | Not Found | - |
|
||||
**500** | Internal Server Error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bundle_id** | **str** | |
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | |
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded |
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
|
||||
**freeform_id** | **str** | | [optional]
|
||||
**patch_id** | **str** | | [optional]
|
||||
**pov_id** | **str** | | [optional]
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | |
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded |
|
||||
**submitted_sarif_id** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**freeform_id** | **str** | |
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | |
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded |
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# TypesMessage
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from buttercup.orchestrator.competition_api_client.models.types_message import TypesMessage
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of TypesMessage from a JSON string
|
||||
types_message_instance = TypesMessage.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(TypesMessage.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
types_message_dict = types_message_instance.to_dict()
|
||||
# create an instance of TypesMessage from a dict
|
||||
types_message_from_dict = TypesMessage.from_dict(types_message_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# TypesRequestSubmission
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**duration_secs** | **int** | Time in seconds until a task should expire. If not provided, defaults to 3600. | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from buttercup.orchestrator.competition_api_client.models.types_request_submission import TypesRequestSubmission
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of TypesRequestSubmission from a JSON string
|
||||
types_request_submission_instance = TypesRequestSubmission.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(TypesRequestSubmission.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
types_request_submission_dict = types_request_submission_instance.to_dict()
|
||||
# create an instance of TypesRequestSubmission from a dict
|
||||
types_request_submission_from_dict = TypesRequestSubmission.from_dict(types_request_submission_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | |
|
||||
**status** | [**TypesSubmissionStatus**](TypesSubmissionStatus.md) | Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded |
|
||||
**submitted_sarif_id** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**assessment** | [**TypesAssessment**](TypesAssessment.md) | |
|
||||
**description** | **str** | Plain text reasoning for the assessment 128KiB max size |
|
||||
**description** | **str** | Plain text reasoning for the assessment. Must be nonempty. 128KiB max size |
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
* `SubmissionStatusErrored` (value: `'errored'`)
|
||||
|
||||
* `SubmissionStatusInconclusive` (value: `'inconclusive'`)
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 1.3.0
|
||||
|
||||
- Introduce `inconclusive` submission status. This status highlights when a test job ran excessively long (8+ hours). It is meant to distinguish inconclusive status from failures and errors. A CRS should not conclude anything
|
||||
about their submission's quality when receiving this status. The status also highlights to the organizers that the submission needs manual review.
|
||||
- Update some descriptions to better highlight endpoint & field use
|
||||
- Introduce an explicit type for 200 responses
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- revert to the default SARIF schema removing the required property on `ruleId`
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,875 @@
|
||||
definitions:
|
||||
types.Architecture:
|
||||
enum:
|
||||
- x86_64
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- ArchitectureX8664
|
||||
types.Assessment:
|
||||
enum:
|
||||
- correct
|
||||
- incorrect
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- AssessmentCorrect
|
||||
- AssessmentIncorrect
|
||||
types.BundleSubmission:
|
||||
properties:
|
||||
broadcast_sarif_id:
|
||||
format: uuid
|
||||
type: string
|
||||
description:
|
||||
description:
|
||||
optional plaintext description of the components of the bundle,
|
||||
such as would be found in a pull request description or bug report
|
||||
type: string
|
||||
freeform_id:
|
||||
format: uuid
|
||||
type: string
|
||||
patch_id:
|
||||
format: uuid
|
||||
type: string
|
||||
pov_id:
|
||||
format: uuid
|
||||
type: string
|
||||
submitted_sarif_id:
|
||||
format: uuid
|
||||
type: string
|
||||
type: object
|
||||
types.BundleSubmissionResponse:
|
||||
properties:
|
||||
bundle_id:
|
||||
format: uuid
|
||||
type: string
|
||||
status:
|
||||
allOf:
|
||||
- $ref: "#/definitions/types.SubmissionStatus"
|
||||
description:
|
||||
Schema-compliant submissions will only ever receive the statuses
|
||||
accepted or deadline_exceeded
|
||||
required:
|
||||
- bundle_id
|
||||
- status
|
||||
type: object
|
||||
types.BundleSubmissionResponseVerbose:
|
||||
properties:
|
||||
broadcast_sarif_id:
|
||||
format: uuid
|
||||
type: string
|
||||
bundle_id:
|
||||
format: uuid
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
freeform_id:
|
||||
format: uuid
|
||||
type: string
|
||||
patch_id:
|
||||
format: uuid
|
||||
type: string
|
||||
pov_id:
|
||||
format: uuid
|
||||
type: string
|
||||
status:
|
||||
allOf:
|
||||
- $ref: "#/definitions/types.SubmissionStatus"
|
||||
description:
|
||||
Schema-compliant submissions will only ever receive the statuses
|
||||
accepted or deadline_exceeded
|
||||
submitted_sarif_id:
|
||||
format: uuid
|
||||
type: string
|
||||
required:
|
||||
- bundle_id
|
||||
- status
|
||||
type: object
|
||||
types.Error:
|
||||
properties:
|
||||
fields:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
message:
|
||||
type: string
|
||||
required:
|
||||
- message
|
||||
type: object
|
||||
types.FreeformResponse:
|
||||
properties:
|
||||
freeform_id:
|
||||
format: uuid
|
||||
type: string
|
||||
status:
|
||||
allOf:
|
||||
- $ref: "#/definitions/types.SubmissionStatus"
|
||||
description:
|
||||
Schema-compliant submissions will only ever receive the statuses
|
||||
accepted or deadline_exceeded
|
||||
required:
|
||||
- freeform_id
|
||||
- status
|
||||
type: object
|
||||
types.FreeformSubmission:
|
||||
properties:
|
||||
submission:
|
||||
description: |-
|
||||
Base64 encoded arbitrary data
|
||||
|
||||
2MiB max size before Base64 encoding
|
||||
type: string
|
||||
required:
|
||||
- submission
|
||||
type: object
|
||||
types.Message:
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
types.POVSubmission:
|
||||
properties:
|
||||
architecture:
|
||||
$ref: "#/definitions/types.Architecture"
|
||||
engine:
|
||||
description: |-
|
||||
Fuzz Tooling Engine that exercises this vuln. Allowable engine values are specified in project.yaml.
|
||||
|
||||
4KiB max size
|
||||
maxLength: 4096
|
||||
type: string
|
||||
fuzzer_name:
|
||||
description: |-
|
||||
Fuzz Tooling fuzzer that exercises this vuln
|
||||
|
||||
4KiB max size
|
||||
maxLength: 4096
|
||||
type: string
|
||||
sanitizer:
|
||||
description: |-
|
||||
Fuzz Tooling Sanitizer that exercises this vuln
|
||||
|
||||
4KiB max size
|
||||
maxLength: 4096
|
||||
type: string
|
||||
testcase:
|
||||
description: |-
|
||||
Base64 encoded vuln trigger
|
||||
|
||||
2MiB max size before Base64 encoding
|
||||
format: base64
|
||||
type: string
|
||||
required:
|
||||
- architecture
|
||||
- engine
|
||||
- fuzzer_name
|
||||
- sanitizer
|
||||
- testcase
|
||||
type: object
|
||||
types.POVSubmissionResponse:
|
||||
properties:
|
||||
pov_id:
|
||||
format: uuid
|
||||
type: string
|
||||
status:
|
||||
$ref: "#/definitions/types.SubmissionStatus"
|
||||
required:
|
||||
- pov_id
|
||||
- status
|
||||
type: object
|
||||
types.PatchSubmission:
|
||||
properties:
|
||||
patch:
|
||||
description: |-
|
||||
Base64 encoded patch in unified diff format
|
||||
|
||||
100KiB max size before Base64 encoding
|
||||
format: base64
|
||||
type: string
|
||||
required:
|
||||
- patch
|
||||
type: object
|
||||
types.PatchSubmissionResponse:
|
||||
properties:
|
||||
functionality_tests_passing:
|
||||
description: null indicates the tests have not been run
|
||||
type: boolean
|
||||
patch_id:
|
||||
format: uuid
|
||||
type: string
|
||||
status:
|
||||
$ref: "#/definitions/types.SubmissionStatus"
|
||||
required:
|
||||
- patch_id
|
||||
- status
|
||||
type: object
|
||||
types.PingResponse:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
type: object
|
||||
types.RequestSubmission:
|
||||
properties:
|
||||
duration_secs:
|
||||
description:
|
||||
Time in seconds until a task should expire. If not provided,
|
||||
defaults to 3600.
|
||||
type: integer
|
||||
type: object
|
||||
types.SARIFSubmission:
|
||||
properties:
|
||||
sarif:
|
||||
description: SARIF object compliant with the provided schema
|
||||
type: object
|
||||
required:
|
||||
- sarif
|
||||
type: object
|
||||
types.SARIFSubmissionResponse:
|
||||
properties:
|
||||
status:
|
||||
allOf:
|
||||
- $ref: "#/definitions/types.SubmissionStatus"
|
||||
description:
|
||||
Schema-compliant submissions will only ever receive the statuses
|
||||
accepted or deadline_exceeded
|
||||
submitted_sarif_id:
|
||||
format: uuid
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- submitted_sarif_id
|
||||
type: object
|
||||
types.SarifAssessmentResponse:
|
||||
properties:
|
||||
status:
|
||||
$ref: "#/definitions/types.SubmissionStatus"
|
||||
required:
|
||||
- status
|
||||
type: object
|
||||
types.SarifAssessmentSubmission:
|
||||
properties:
|
||||
assessment:
|
||||
$ref: "#/definitions/types.Assessment"
|
||||
description:
|
||||
description: |-
|
||||
Plain text reasoning for the assessment.
|
||||
|
||||
Must be nonempty.
|
||||
|
||||
128KiB max size
|
||||
maxLength: 131072
|
||||
type: string
|
||||
required:
|
||||
- assessment
|
||||
- description
|
||||
type: object
|
||||
types.SubmissionStatus:
|
||||
enum:
|
||||
- accepted
|
||||
- passed
|
||||
- failed
|
||||
- deadline_exceeded
|
||||
- errored
|
||||
- inconclusive
|
||||
type: string
|
||||
x-enum-comments:
|
||||
SubmissionStatusAccepted: Successfully submitted
|
||||
SubmissionStatusDeadlineExceeded:
|
||||
Task deadline exceeded. All submissions marked
|
||||
accepted before the deadline will be evaluated.
|
||||
SubmissionStatusErrored: Server side error when testing submission
|
||||
SubmissionStatusFailed: Submission failed testing
|
||||
SubmissionStatusInconclusive:
|
||||
Test continued running beyond timeout and will
|
||||
be manually reviewed after the round. As a result this status is inconclusive.
|
||||
SubmissionStatusPassed: Successfully evaluated submission
|
||||
x-enum-varnames:
|
||||
- SubmissionStatusAccepted
|
||||
- SubmissionStatusPassed
|
||||
- SubmissionStatusFailed
|
||||
- SubmissionStatusDeadlineExceeded
|
||||
- SubmissionStatusErrored
|
||||
- SubmissionStatusInconclusive
|
||||
info:
|
||||
contact: {}
|
||||
title: Example Competition API
|
||||
version: 1.3.0
|
||||
paths:
|
||||
/v1/ping/:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Test authentication creds and network connectivity
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.PingResponse"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Test authentication creds and network connectivity
|
||||
tags:
|
||||
- ping
|
||||
/v1/request/delta/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Send a delta task to the source of this request
|
||||
parameters:
|
||||
- description: Submission Body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.RequestSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.Message"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Send a delta task to the source of this request
|
||||
tags:
|
||||
- request
|
||||
/v1/task/{task_id}/broadcast-sarif-assessment/{broadcast_sarif_id}/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Submit a SARIF assessment
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Broadcast SARIF ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: broadcast_sarif_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Submission body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.SarifAssessmentSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.SarifAssessmentResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit a SARIF Assessment
|
||||
tags:
|
||||
- broadcast-sarif-assessment
|
||||
/v1/task/{task_id}/bundle/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: submits a bundle
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Submission Body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.BundleSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.BundleSubmissionResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit Bundle
|
||||
tags:
|
||||
- bundle
|
||||
/v1/task/{task_id}/bundle/{bundle_id}/:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: delete a bundle
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Bundle ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: bundle_id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
schema:
|
||||
type: string
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Delete Bundle
|
||||
tags:
|
||||
- bundle
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: get a bundle
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Bundle ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: bundle_id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.BundleSubmissionResponseVerbose"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Get Bundle
|
||||
tags:
|
||||
- bundle
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: updates a bundle
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Bundle ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: bundle_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Submission Body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.BundleSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.BundleSubmissionResponseVerbose"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Update Bundle
|
||||
tags:
|
||||
- bundle
|
||||
/v1/task/{task_id}/freeform/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description:
|
||||
CRSs may submit anything to this endpoint as a PoV. This is particularly
|
||||
useful for unharnessed challenges, but will be open for other challenges also. Freeform
|
||||
PoVs are not evaluated automatically.
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Submission Body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.FreeformSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.FreeformResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit Freeform
|
||||
tags:
|
||||
- freeform
|
||||
/v1/task/{task_id}/patch/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: submit a patch for testing
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Payload
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.PatchSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.PatchSubmissionResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit Patch
|
||||
tags:
|
||||
- patch
|
||||
/v1/task/{task_id}/patch/{patch_id}/:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: yield the status of patch testing
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Patch ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: patch_id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.PatchSubmissionResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Patch Status
|
||||
tags:
|
||||
- patch
|
||||
/v1/task/{task_id}/pov/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: submit a vulnerability for testing
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Submission body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.POVSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.POVSubmissionResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit Vulnerability
|
||||
tags:
|
||||
- pov
|
||||
/v1/task/{task_id}/pov/{pov_id}/:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: yield the status of vuln testing
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: POV ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: pov_id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.POVSubmissionResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Vulnerability Status
|
||||
tags:
|
||||
- pov
|
||||
/v1/task/{task_id}/submitted-sarif/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Submit a CRS generated SARIF
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
- description: Submission body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.SARIFSubmission"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: "#/definitions/types.SARIFSubmissionResponse"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: "#/definitions/types.Error"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit a CRS generated SARIF
|
||||
tags:
|
||||
- submitted-sarif
|
||||
securityDefinitions:
|
||||
BasicAuth:
|
||||
type: basic
|
||||
swagger: "2.0"
|
||||
@@ -3,7 +3,7 @@
|
||||
"info": {
|
||||
"title": "Example Competition API",
|
||||
"contact": {},
|
||||
"version": "1.2.0"
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"paths": {
|
||||
"/v1/ping/": {
|
||||
@@ -52,9 +52,9 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "No Content",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/types.Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@@ -426,7 +426,7 @@
|
||||
"BasicAuth": []
|
||||
}
|
||||
],
|
||||
"description": "submits a freeform pov",
|
||||
"description": "CRSs may submit anything to this endpoint as a PoV. This is particularly useful for unharnessed challenges, but will be open for other challenges also. Freeform PoVs are not evaluated automatically.",
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["freeform"],
|
||||
@@ -950,6 +950,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.Message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.POVSubmission": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1089,7 +1097,7 @@
|
||||
"$ref": "#/definitions/types.Assessment"
|
||||
},
|
||||
"description": {
|
||||
"description": "Plain text reasoning for the assessment\n\n128KiB max size",
|
||||
"description": "Plain text reasoning for the assessment.\n\nMust be nonempty.\n\n128KiB max size",
|
||||
"type": "string",
|
||||
"maxLength": 131072
|
||||
}
|
||||
@@ -1097,12 +1105,20 @@
|
||||
},
|
||||
"types.SubmissionStatus": {
|
||||
"type": "string",
|
||||
"enum": ["accepted", "passed", "failed", "deadline_exceeded", "errored"],
|
||||
"enum": [
|
||||
"accepted",
|
||||
"passed",
|
||||
"failed",
|
||||
"deadline_exceeded",
|
||||
"errored",
|
||||
"inconclusive"
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"SubmissionStatusAccepted": "Successfully submitted",
|
||||
"SubmissionStatusDeadlineExceeded": "Task deadline exceeded. All submissions marked accepted before the deadline will be evaluated.",
|
||||
"SubmissionStatusErrored": "Server side error when testing submission",
|
||||
"SubmissionStatusFailed": "Submission failed testing",
|
||||
"SubmissionStatusInconclusive": "Test continued running beyond timeout and will be manually reviewed after the round. As a result this status is inconclusive.",
|
||||
"SubmissionStatusPassed": "Successfully evaluated submission"
|
||||
},
|
||||
"x-enum-varnames": [
|
||||
@@ -1110,7 +1126,8 @@
|
||||
"SubmissionStatusPassed",
|
||||
"SubmissionStatusFailed",
|
||||
"SubmissionStatusDeadlineExceeded",
|
||||
"SubmissionStatusErrored"
|
||||
"SubmissionStatusErrored",
|
||||
"SubmissionStatusInconclusive"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -120,6 +120,11 @@ definitions:
|
||||
required:
|
||||
- submission
|
||||
type: object
|
||||
types.Message:
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
types.POVSubmission:
|
||||
properties:
|
||||
architecture:
|
||||
@@ -247,7 +252,9 @@ definitions:
|
||||
$ref: "#/definitions/types.Assessment"
|
||||
description:
|
||||
description: |-
|
||||
Plain text reasoning for the assessment
|
||||
Plain text reasoning for the assessment.
|
||||
|
||||
Must be nonempty.
|
||||
|
||||
128KiB max size
|
||||
maxLength: 131072
|
||||
@@ -263,6 +270,7 @@ definitions:
|
||||
- failed
|
||||
- deadline_exceeded
|
||||
- errored
|
||||
- inconclusive
|
||||
type: string
|
||||
x-enum-comments:
|
||||
SubmissionStatusAccepted: Successfully submitted
|
||||
@@ -271,6 +279,9 @@ definitions:
|
||||
accepted before the deadline will be evaluated.
|
||||
SubmissionStatusErrored: Server side error when testing submission
|
||||
SubmissionStatusFailed: Submission failed testing
|
||||
SubmissionStatusInconclusive:
|
||||
Test continued running beyond timeout and will
|
||||
be manually reviewed after the round. As a result this status is inconclusive.
|
||||
SubmissionStatusPassed: Successfully evaluated submission
|
||||
x-enum-varnames:
|
||||
- SubmissionStatusAccepted
|
||||
@@ -278,10 +289,11 @@ definitions:
|
||||
- SubmissionStatusFailed
|
||||
- SubmissionStatusDeadlineExceeded
|
||||
- SubmissionStatusErrored
|
||||
- SubmissionStatusInconclusive
|
||||
info:
|
||||
contact: {}
|
||||
title: Example Competition API
|
||||
version: 1.2.0
|
||||
version: 1.3.0
|
||||
paths:
|
||||
/v1/ping/:
|
||||
get:
|
||||
@@ -314,9 +326,9 @@ paths:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: No Content
|
||||
description: OK
|
||||
schema:
|
||||
type: string
|
||||
$ref: "#/definitions/types.Message"
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
@@ -582,7 +594,10 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: submits a freeform pov
|
||||
description:
|
||||
CRSs may submit anything to this endpoint as a PoV. This is particularly
|
||||
useful for unharnessed challenges, but will be open for other challenges also. Freeform
|
||||
PoVs are not evaluated automatically.
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
|
||||
@@ -0,0 +1,404 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Example CRS API",
|
||||
"contact": {},
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"paths": {
|
||||
"/status/": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BasicAuth": []
|
||||
}
|
||||
],
|
||||
"description": "report the status of the CRS",
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["status"],
|
||||
"summary": "CRS Status",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Status Obect",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/types.Status"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BasicAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Reset all stats in the status endpoint.",
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["status"],
|
||||
"summary": "Reset status stats",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/sarif/": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BasicAuth": []
|
||||
}
|
||||
],
|
||||
"description": "submit a sarif broadcast",
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["sarif"],
|
||||
"summary": "Submit Sarif Broadcast",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Vulnerability Broadcast",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/types.SARIFBroadcast"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/task/": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BasicAuth": []
|
||||
}
|
||||
],
|
||||
"description": "submit a task for work",
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["task"],
|
||||
"summary": "Submit Task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Submission body",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/types.Task"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"202": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BasicAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Cancel all previously submitted tasks. This is meant for edge case recovery in case something goes wrong.",
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["task"],
|
||||
"summary": "Cancel Tasks",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/task/{task_id}/": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BasicAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Cancel a task by id. This is meant for edge case recovery in case something goes wrong.",
|
||||
"consumes": ["application/json"],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["task"],
|
||||
"summary": "Cancel Task",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Task ID",
|
||||
"name": "task_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"types.SARIFBroadcast": {
|
||||
"type": "object",
|
||||
"required": ["broadcasts", "message_id", "message_time"],
|
||||
"properties": {
|
||||
"broadcasts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/types.SARIFBroadcastDetail"
|
||||
}
|
||||
},
|
||||
"message_id": {
|
||||
"description": "Unique ID for this message. The system will retry sending messages if it does not receive a 200 response code.\nUse this to determine if you have already processed a message.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"message_time": {
|
||||
"description": "UNIX millisecond timestamp for when the message was sent",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.SARIFBroadcastDetail": {
|
||||
"type": "object",
|
||||
"required": ["metadata", "sarif", "sarif_id", "task_id"],
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"description": "String to string map containing data that should be attached to outputs like log messages and OpenTelemetry trace attributes for traceability",
|
||||
"type": "object"
|
||||
},
|
||||
"sarif": {
|
||||
"description": "SARIF Report compliant with provided schema",
|
||||
"type": "object"
|
||||
},
|
||||
"sarif_id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.SourceDetail": {
|
||||
"type": "object",
|
||||
"required": ["sha256", "type", "url"],
|
||||
"properties": {
|
||||
"sha256": {
|
||||
"description": "Integrity hash of the gzipped tarball",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/types.SourceType"
|
||||
},
|
||||
"url": {
|
||||
"description": "URL to fetch the source gzipped tarball",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.SourceType": {
|
||||
"type": "string",
|
||||
"enum": ["repo", "fuzz-tooling", "diff"],
|
||||
"x-enum-varnames": [
|
||||
"SourceTypeRepo",
|
||||
"SourceTypeFuzzTooling",
|
||||
"SourceTypeDiff"
|
||||
]
|
||||
},
|
||||
"types.Status": {
|
||||
"type": "object",
|
||||
"required": ["ready", "since", "state", "version"],
|
||||
"properties": {
|
||||
"details": {
|
||||
"description": "This is optional arbitrary content that may be logged in error cases, but is mainly for interactive troubleshooting.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ready": {
|
||||
"description": "Boolean indicating if the CRS is prepared to work on tasks. Do not return true unless you have successfully tested connectivity to the Competition API via /v1/ping/",
|
||||
"type": "boolean"
|
||||
},
|
||||
"since": {
|
||||
"description": "Last time task and submission stats were reset. Unix timestamp at millisecond resolution.",
|
||||
"type": "integer"
|
||||
},
|
||||
"state": {
|
||||
"description": "State of the currently running tasks and submissions",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/types.StatusState"
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": {
|
||||
"description": "Version string for verification and reproducibility.\n\n- git commit\n\n- SemVer\n\n- etc",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.StatusState": {
|
||||
"type": "object",
|
||||
"required": ["tasks"],
|
||||
"properties": {
|
||||
"tasks": {
|
||||
"$ref": "#/definitions/types.StatusTasksState"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.StatusTasksState": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"canceled",
|
||||
"errored",
|
||||
"failed",
|
||||
"pending",
|
||||
"processing",
|
||||
"succeeded",
|
||||
"waiting"
|
||||
],
|
||||
"properties": {
|
||||
"canceled": {
|
||||
"description": "Number of tasks that competition infrastructure has cancelled",
|
||||
"type": "integer"
|
||||
},
|
||||
"errored": {
|
||||
"description": "Number of tasks that the CRS encountered an unrecoverable issue for",
|
||||
"type": "integer"
|
||||
},
|
||||
"failed": {
|
||||
"description": "Number of submissions that the competition infrastructure marked failed",
|
||||
"type": "integer"
|
||||
},
|
||||
"pending": {
|
||||
"description": "Number of tasks that the CRS has not started work on",
|
||||
"type": "integer"
|
||||
},
|
||||
"processing": {
|
||||
"description": "Number of tasks that the CRS is currently processing",
|
||||
"type": "integer"
|
||||
},
|
||||
"succeeded": {
|
||||
"description": "Number of submissions that the competition infrastructure marked passed",
|
||||
"type": "integer"
|
||||
},
|
||||
"waiting": {
|
||||
"description": "Number of submissions that the competition infrastructure is currently testing",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.Task": {
|
||||
"type": "object",
|
||||
"required": ["message_id", "message_time", "tasks"],
|
||||
"properties": {
|
||||
"message_id": {
|
||||
"description": "Unique ID for this message. The system will retry sending messages if it does not receive a 200 response code.\nUse this to determine if you have already processed a message.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"message_time": {
|
||||
"description": "UNIX millisecond timestamp for when the message was sent",
|
||||
"type": "integer"
|
||||
},
|
||||
"tasks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/types.TaskDetail"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.TaskDetail": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"deadline",
|
||||
"focus",
|
||||
"harnesses_included",
|
||||
"metadata",
|
||||
"project_name",
|
||||
"source",
|
||||
"task_id",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"deadline": {
|
||||
"description": "UNIX millisecond timestamp by which any submissions for this task must be in",
|
||||
"type": "integer"
|
||||
},
|
||||
"focus": {
|
||||
"description": "The folder in the type repo source tarball containing the main project.\n\nThis is the project the CRS is meant to submit vulns, patches, and SARIF assessments against.",
|
||||
"type": "string"
|
||||
},
|
||||
"harnesses_included": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"metadata": {
|
||||
"description": "String to string map containing data that should be attached to outputs like log messages and OpenTelemetry trace attributes for traceability",
|
||||
"type": "object"
|
||||
},
|
||||
"project_name": {
|
||||
"description": "OSS Fuzz project name",
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"description": "List of sources needed to evaluate a task",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/types.SourceDetail"
|
||||
}
|
||||
},
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/types.TaskType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types.TaskType": {
|
||||
"type": "string",
|
||||
"enum": ["full", "delta"],
|
||||
"x-enum-varnames": ["TaskTypeFull", "TaskTypeDelta"]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"BasicAuth": {
|
||||
"type": "basic"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,360 @@
|
||||
definitions:
|
||||
types.SARIFBroadcast:
|
||||
properties:
|
||||
broadcasts:
|
||||
items:
|
||||
$ref: "#/definitions/types.SARIFBroadcastDetail"
|
||||
type: array
|
||||
message_id:
|
||||
description: |-
|
||||
Unique ID for this message. The system will retry sending messages if it does not receive a 200 response code.
|
||||
Use this to determine if you have already processed a message.
|
||||
format: uuid
|
||||
type: string
|
||||
message_time:
|
||||
description: UNIX millisecond timestamp for when the message was sent
|
||||
type: integer
|
||||
required:
|
||||
- broadcasts
|
||||
- message_id
|
||||
- message_time
|
||||
type: object
|
||||
types.SARIFBroadcastDetail:
|
||||
properties:
|
||||
metadata:
|
||||
description:
|
||||
String to string map containing data that should be attached
|
||||
to outputs like log messages and OpenTelemetry trace attributes for traceability
|
||||
type: object
|
||||
sarif:
|
||||
description: SARIF Report compliant with provided schema
|
||||
type: object
|
||||
sarif_id:
|
||||
format: uuid
|
||||
type: string
|
||||
task_id:
|
||||
format: uuid
|
||||
type: string
|
||||
required:
|
||||
- metadata
|
||||
- sarif
|
||||
- sarif_id
|
||||
- task_id
|
||||
type: object
|
||||
types.SourceDetail:
|
||||
properties:
|
||||
sha256:
|
||||
description: Integrity hash of the gzipped tarball
|
||||
type: string
|
||||
type:
|
||||
$ref: "#/definitions/types.SourceType"
|
||||
url:
|
||||
description: URL to fetch the source gzipped tarball
|
||||
type: string
|
||||
required:
|
||||
- sha256
|
||||
- type
|
||||
- url
|
||||
type: object
|
||||
types.SourceType:
|
||||
enum:
|
||||
- repo
|
||||
- fuzz-tooling
|
||||
- diff
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- SourceTypeRepo
|
||||
- SourceTypeFuzzTooling
|
||||
- SourceTypeDiff
|
||||
types.Status:
|
||||
properties:
|
||||
details:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description:
|
||||
This is optional arbitrary content that may be logged in error
|
||||
cases, but is mainly for interactive troubleshooting.
|
||||
type: object
|
||||
ready:
|
||||
description:
|
||||
Boolean indicating if the CRS is prepared to work on tasks. Do
|
||||
not return true unless you have successfully tested connectivity to the
|
||||
Competition API via /v1/ping/
|
||||
type: boolean
|
||||
since:
|
||||
description:
|
||||
Last time task and submission stats were reset. Unix timestamp
|
||||
at millisecond resolution.
|
||||
type: integer
|
||||
state:
|
||||
allOf:
|
||||
- $ref: "#/definitions/types.StatusState"
|
||||
description: State of the currently running tasks and submissions
|
||||
version:
|
||||
description: |-
|
||||
Version string for verification and reproducibility.
|
||||
|
||||
- git commit
|
||||
|
||||
- SemVer
|
||||
|
||||
- etc
|
||||
type: string
|
||||
required:
|
||||
- ready
|
||||
- since
|
||||
- state
|
||||
- version
|
||||
type: object
|
||||
types.StatusState:
|
||||
properties:
|
||||
tasks:
|
||||
$ref: "#/definitions/types.StatusTasksState"
|
||||
required:
|
||||
- tasks
|
||||
type: object
|
||||
types.StatusTasksState:
|
||||
properties:
|
||||
canceled:
|
||||
description: Number of tasks that competition infrastructure has cancelled
|
||||
type: integer
|
||||
errored:
|
||||
description:
|
||||
Number of tasks that the CRS encountered an unrecoverable issue
|
||||
for
|
||||
type: integer
|
||||
failed:
|
||||
description:
|
||||
Number of submissions that the competition infrastructure marked
|
||||
failed
|
||||
type: integer
|
||||
pending:
|
||||
description: Number of tasks that the CRS has not started work on
|
||||
type: integer
|
||||
processing:
|
||||
description: Number of tasks that the CRS is currently processing
|
||||
type: integer
|
||||
succeeded:
|
||||
description:
|
||||
Number of submissions that the competition infrastructure marked
|
||||
passed
|
||||
type: integer
|
||||
waiting:
|
||||
description:
|
||||
Number of submissions that the competition infrastructure is
|
||||
currently testing
|
||||
type: integer
|
||||
required:
|
||||
- canceled
|
||||
- errored
|
||||
- failed
|
||||
- pending
|
||||
- processing
|
||||
- succeeded
|
||||
- waiting
|
||||
type: object
|
||||
types.Task:
|
||||
properties:
|
||||
message_id:
|
||||
description: |-
|
||||
Unique ID for this message. The system will retry sending messages if it does not receive a 200 response code.
|
||||
Use this to determine if you have already processed a message.
|
||||
format: uuid
|
||||
type: string
|
||||
message_time:
|
||||
description: UNIX millisecond timestamp for when the message was sent
|
||||
type: integer
|
||||
tasks:
|
||||
items:
|
||||
$ref: "#/definitions/types.TaskDetail"
|
||||
type: array
|
||||
required:
|
||||
- message_id
|
||||
- message_time
|
||||
- tasks
|
||||
type: object
|
||||
types.TaskDetail:
|
||||
properties:
|
||||
deadline:
|
||||
description:
|
||||
UNIX millisecond timestamp by which any submissions for this
|
||||
task must be in
|
||||
type: integer
|
||||
focus:
|
||||
description: |-
|
||||
The folder in the type repo source tarball containing the main project.
|
||||
|
||||
This is the project the CRS is meant to submit vulns, patches, and SARIF assessments against.
|
||||
type: string
|
||||
harnesses_included:
|
||||
type: boolean
|
||||
metadata:
|
||||
description:
|
||||
String to string map containing data that should be attached
|
||||
to outputs like log messages and OpenTelemetry trace attributes for traceability
|
||||
type: object
|
||||
project_name:
|
||||
description: OSS Fuzz project name
|
||||
type: string
|
||||
source:
|
||||
description: List of sources needed to evaluate a task
|
||||
items:
|
||||
$ref: "#/definitions/types.SourceDetail"
|
||||
type: array
|
||||
task_id:
|
||||
format: uuid
|
||||
type: string
|
||||
type:
|
||||
$ref: "#/definitions/types.TaskType"
|
||||
required:
|
||||
- deadline
|
||||
- focus
|
||||
- harnesses_included
|
||||
- metadata
|
||||
- project_name
|
||||
- source
|
||||
- task_id
|
||||
- type
|
||||
type: object
|
||||
types.TaskType:
|
||||
enum:
|
||||
- full
|
||||
- delta
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- TaskTypeFull
|
||||
- TaskTypeDelta
|
||||
info:
|
||||
contact: {}
|
||||
title: Example CRS API
|
||||
version: 1.3.0
|
||||
paths:
|
||||
/status/:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Reset all stats in the status endpoint.
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: No Content
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Reset status stats
|
||||
tags:
|
||||
- status
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: report the status of the CRS
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Status Obect
|
||||
schema:
|
||||
$ref: "#/definitions/types.Status"
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: CRS Status
|
||||
tags:
|
||||
- status
|
||||
/v1/sarif/:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: submit a sarif broadcast
|
||||
parameters:
|
||||
- description: Vulnerability Broadcast
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.SARIFBroadcast"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: No Content
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit Sarif Broadcast
|
||||
tags:
|
||||
- sarif
|
||||
/v1/task/:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description:
|
||||
Cancel all previously submitted tasks. This is meant for edge case
|
||||
recovery in case something goes wrong.
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: No Content
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Cancel Tasks
|
||||
tags:
|
||||
- task
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: submit a task for work
|
||||
parameters:
|
||||
- description: Submission body
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/types.Task"
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"202":
|
||||
description: No Content
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Submit Task
|
||||
tags:
|
||||
- task
|
||||
/v1/task/{task_id}/:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description:
|
||||
Cancel a task by id. This is meant for edge case recovery in case
|
||||
something goes wrong.
|
||||
parameters:
|
||||
- description: Task ID
|
||||
format: uuid
|
||||
in: path
|
||||
name: task_id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: No Content
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- BasicAuth: []
|
||||
summary: Cancel Task
|
||||
tags:
|
||||
- task
|
||||
securityDefinitions:
|
||||
BasicAuth:
|
||||
type: basic
|
||||
swagger: "2.0"
|
||||
@@ -3,7 +3,7 @@
|
||||
"info": {
|
||||
"title": "Example CRS API",
|
||||
"contact": {},
|
||||
"version": "1.2.0"
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"paths": {
|
||||
"/status/": {
|
||||
@@ -360,7 +360,7 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"focus": {
|
||||
"description": "Because the challenge task may contain multiple repositories, the folder in the type repo source tarball containing the main project.\nIt is still set when there is only one repository.\n\nThis is the project the CRS is meant to submit vulns, patches, and SARIF assessments against.",
|
||||
"description": "The folder in the type repo source tarball containing the main project.\n\nThis is the project the CRS is meant to submit vulns, patches, and SARIF assessments against.",
|
||||
"type": "string"
|
||||
},
|
||||
"harnesses_included": {
|
||||
|
||||
@@ -182,8 +182,7 @@ definitions:
|
||||
type: integer
|
||||
focus:
|
||||
description: |-
|
||||
Because the challenge task may contain multiple repositories, the folder in the type repo source tarball containing the main project.
|
||||
It is still set when there is only one repository.
|
||||
The folder in the type repo source tarball containing the main project.
|
||||
|
||||
This is the project the CRS is meant to submit vulns, patches, and SARIF assessments against.
|
||||
type: string
|
||||
@@ -228,7 +227,7 @@ definitions:
|
||||
info:
|
||||
contact: {}
|
||||
title: Example CRS API
|
||||
version: 1.2.0
|
||||
version: 1.3.0
|
||||
paths:
|
||||
/status/:
|
||||
delete:
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# LLM Providers and Models
|
||||
|
||||
All publicly available models from the following providers are approved for usage in AIxCC.
|
||||
|
||||
- OpenAI
|
||||
- Anthropic
|
||||
- Google Gemini
|
||||
- xAI
|
||||
|
||||
> This is subject to change
|
||||
@@ -0,0 +1,15 @@
|
||||
# Round Information Overview
|
||||
|
||||
All information about the Rounds for AIxCC Final Competition shall be provided here.
|
||||
|
||||
## Exhibition 1
|
||||
|
||||
2 Delta Challenges (1 C, 1 Java) with 48 hours in duration.
|
||||
|
||||
See more at [Exhibition Round 1](./exhibition-round-1.md)
|
||||
|
||||
## Exhibition 2
|
||||
|
||||
9 Delta Challenges (6 C, 3 Java), 6 Full Scan Challenges (4 C, 2 Java).
|
||||
|
||||
See more at [Exhibition Round 2](./exhibition-round-2.md)
|
||||
@@ -0,0 +1,24 @@
|
||||
# Exhibition Round 1
|
||||
|
||||
2 Delta Challenges (1 C, 1 Java) with 48 hours in duration.
|
||||
|
||||
## Repositories
|
||||
|
||||
The following repositories were used during the Round:
|
||||
|
||||
- Libxml2 (C)
|
||||
- Zookeeper (Java)
|
||||
|
||||
## Challenge Sequencing
|
||||
|
||||
Both Challenges were Delta challenges and sent similtaneously.
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph "Challenge Set #0 (48 hr)"
|
||||
direction LR
|
||||
A0["zookeeper: Delta 1"]
|
||||
B0["libxml2: Delta 1"]
|
||||
end
|
||||
|
||||
```
|
||||
@@ -0,0 +1,78 @@
|
||||
# Exhibition Round 2
|
||||
|
||||
9 Delta Challenges (6 C, 3 Java), 6 Full Scan Challenges (4 C, 2 Java).
|
||||
|
||||
## Repositories
|
||||
|
||||
The following repositories were used during the Round:
|
||||
|
||||
- Libxml2 (C)
|
||||
- Libpng (C)
|
||||
- AIxCC Integration Test (C)
|
||||
- FreeRDP (C)
|
||||
- Sqlite (C)
|
||||
- Dropbear (C)
|
||||
- Zookeeper (Java)
|
||||
- Apache Commons Compress (Java)
|
||||
|
||||
## Challenge Tasks Archive
|
||||
|
||||
Download all challenge tasks that were sent during the Round: [exhibition2_challenge_tasks.tar.gz](./exhibition2_challenge_tasks.tar.gz).
|
||||
|
||||
Note: Times included in tasks.json are descriptive of when the Competition API generated the task,
|
||||
and not the exact times of when the message was broadcast to each CRS (it should be close though!).
|
||||
|
||||
## Sequencing
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph A["Challenge Set #0 (24 hr)"]
|
||||
direction LR
|
||||
A0["freerdp: Full 1"]
|
||||
B0["libxml2: Full 1"]
|
||||
C0["sqlite: Full 1"]
|
||||
end
|
||||
|
||||
subgraph B["Challenge Set #1 (24 hr)"]
|
||||
direction LR
|
||||
A1["commons-compress: Full 1"]
|
||||
B1["zookeeper: Full 1"]
|
||||
C1["dropbear: Full 1"]
|
||||
end
|
||||
|
||||
subgraph C["Challenge Set #2 (8 hr)"]
|
||||
direction LR
|
||||
A2["freerdp: Delta 1"]
|
||||
B2["libxml2: Delta 2"]
|
||||
C2["integration-test: Delta 1"]
|
||||
D2["libpng: Delta 1"]
|
||||
end
|
||||
|
||||
subgraph D["Challenge Set #3 (8 hr)"]
|
||||
direction LR
|
||||
A3["sqlite: Delta 1"]
|
||||
B3["libxml2: Delta 1"]
|
||||
end
|
||||
|
||||
subgraph E["Challenge Set #4 (8 hr)"]
|
||||
direction LR
|
||||
A4["zookeeper: Delta 1"]
|
||||
B4["commons-compress: Delta 2"]
|
||||
C4["commons-compress: Delta 3"]
|
||||
end
|
||||
|
||||
subgraph F["\* Rerun Chal Set #1 (12 hr)"]
|
||||
direction LR
|
||||
A5["commons-compress: Full 1"]
|
||||
B5["zookeeper: Full 1"]
|
||||
C5["dropbear: Full 1"]
|
||||
end
|
||||
|
||||
A --> B --> C --> D --> E --> F
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
\* Challenge Set #1 was re-run during Exhibition Round 2 due to an upstream outage at OpenAI from 7:07pm ET on May 6th, 2025 to 3:15pm ET on May 8th, 2025.
|
||||
As a result, CRS's using OpenAI were unable to make LLM API calls. The Organizers decided to re-run Challenge Set #1 as part of Exhibition 2 for 12 hours.
|
||||
Challenge Set #0 had run successfully for ~5 hours before the outage. When access was restored, we reset budget amounts for all teams for Azure and LLMs and added a re-run of Challenge Set #1.
|
||||
@@ -0,0 +1,41 @@
|
||||
# Project Source Language Determination
|
||||
|
||||
As part of evaluating a patch, Scantron has to determine if it only modifies files in the target project's language.
|
||||
|
||||
Scantron uses [go-enry](https://github.com/go-enry/go-enry) v2.9.2 to determine a file's language. This folder contains binaries so that you can run the same process outside of Scantron.
|
||||
|
||||
## Binaries
|
||||
|
||||
These can be found in the [dist](dist) folder.
|
||||
|
||||
## Usage
|
||||
|
||||
`identifier` accepts a language, either `java` or `c`, and a path to a source file. It returns both a string boolean and a return code indicating whether the source file is in the specified language.
|
||||
|
||||
```bash
|
||||
$ ./identifier --help
|
||||
Identifies file type
|
||||
|
||||
Usage:
|
||||
identifier [flags]
|
||||
|
||||
Flags:
|
||||
-h, --help help for identifier
|
||||
--language Language "java" or "c"
|
||||
--path string Path to file to check
|
||||
|
||||
$ ./identifier --language java --path ~/Source.java
|
||||
true
|
||||
$ echo $?
|
||||
0
|
||||
|
||||
$ ./identifier --language c --path ~/Source.java
|
||||
false
|
||||
$ echo $?
|
||||
1
|
||||
|
||||
$ ./identifier --language c --path ~/nonexistent
|
||||
Error: open /home/user/nonexistent
|
||||
$ echo $?
|
||||
201
|
||||
```
|
||||
@@ -36,7 +36,7 @@ $PYTHON_CMD -m venv "$TEMPDIR/venv"
|
||||
USER_ID=$(id -u)
|
||||
GROUP_ID=$(id -g)
|
||||
docker run --rm --user $USER_ID:$GROUP_ID -v "$(realpath example-crs-architecture/docs/api):/local" -v "$OUTPUT_DIR/src/buttercup/orchestrator:/out" openapitools/openapi-generator-cli generate \
|
||||
-i /local/competition-swagger-v1.1.json \
|
||||
-i /local/competition-swagger-v1.3.0.json \
|
||||
-g python \
|
||||
-o /out \
|
||||
--package-name competition_api_client
|
||||
@@ -60,7 +60,7 @@ pip install uvicorn
|
||||
pip install fastapi
|
||||
|
||||
TEMPDIR=$(mktemp -d)
|
||||
curl -o "$TEMPDIR/openapi.json" -X POST https://converter.swagger.io/api/convert -H "Content-Type: application/json" --data-binary "@example-crs-architecture/docs/api/crs-swagger-v1.1.json"
|
||||
curl -o "$TEMPDIR/openapi.json" -X POST https://converter.swagger.io/api/convert -H "Content-Type: application/json" --data-binary "@example-crs-architecture/docs/api/crs-swagger-v1.3.0.json"
|
||||
|
||||
fastapi-codegen --input "$TEMPDIR/openapi.json" --output "$OUTPUT_DIR/src/buttercup/orchestrator/task_server"
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ competition_api_client/__init__.py
|
||||
competition_api_client/api/__init__.py
|
||||
competition_api_client/api/broadcast_sarif_assessment_api.py
|
||||
competition_api_client/api/bundle_api.py
|
||||
competition_api_client/api/feeform_api.py
|
||||
competition_api_client/api/freeform_api.py
|
||||
competition_api_client/api/patch_api.py
|
||||
competition_api_client/api/ping_api.py
|
||||
competition_api_client/api/pov_api.py
|
||||
competition_api_client/api/request_api.py
|
||||
competition_api_client/api/submitted_sarif_api.py
|
||||
competition_api_client/api_client.py
|
||||
competition_api_client/api_response.py
|
||||
@@ -21,11 +22,13 @@ competition_api_client/models/types_bundle_submission_response_verbose.py
|
||||
competition_api_client/models/types_error.py
|
||||
competition_api_client/models/types_freeform_response.py
|
||||
competition_api_client/models/types_freeform_submission.py
|
||||
competition_api_client/models/types_message.py
|
||||
competition_api_client/models/types_patch_submission.py
|
||||
competition_api_client/models/types_patch_submission_response.py
|
||||
competition_api_client/models/types_ping_response.py
|
||||
competition_api_client/models/types_pov_submission.py
|
||||
competition_api_client/models/types_pov_submission_response.py
|
||||
competition_api_client/models/types_request_submission.py
|
||||
competition_api_client/models/types_sarif_assessment_response.py
|
||||
competition_api_client/models/types_sarif_assessment_submission.py
|
||||
competition_api_client/models/types_sarif_submission.py
|
||||
@@ -35,10 +38,11 @@ competition_api_client/py.typed
|
||||
competition_api_client/rest.py
|
||||
docs/BroadcastSarifAssessmentApi.md
|
||||
docs/BundleApi.md
|
||||
docs/FeeformApi.md
|
||||
docs/FreeformApi.md
|
||||
docs/PatchApi.md
|
||||
docs/PingApi.md
|
||||
docs/PovApi.md
|
||||
docs/RequestApi.md
|
||||
docs/SubmittedSarifApi.md
|
||||
docs/TypesArchitecture.md
|
||||
docs/TypesAssessment.md
|
||||
@@ -48,11 +52,13 @@ docs/TypesBundleSubmissionResponseVerbose.md
|
||||
docs/TypesError.md
|
||||
docs/TypesFreeformResponse.md
|
||||
docs/TypesFreeformSubmission.md
|
||||
docs/TypesMessage.md
|
||||
docs/TypesPOVSubmission.md
|
||||
docs/TypesPOVSubmissionResponse.md
|
||||
docs/TypesPatchSubmission.md
|
||||
docs/TypesPatchSubmissionResponse.md
|
||||
docs/TypesPingResponse.md
|
||||
docs/TypesRequestSubmission.md
|
||||
docs/TypesSARIFSubmission.md
|
||||
docs/TypesSARIFSubmissionResponse.md
|
||||
docs/TypesSarifAssessmentResponse.md
|
||||
@@ -61,10 +67,11 @@ docs/TypesSubmissionStatus.md
|
||||
test/__init__.py
|
||||
test/test_broadcast_sarif_assessment_api.py
|
||||
test/test_bundle_api.py
|
||||
test/test_feeform_api.py
|
||||
test/test_freeform_api.py
|
||||
test/test_patch_api.py
|
||||
test/test_ping_api.py
|
||||
test/test_pov_api.py
|
||||
test/test_request_api.py
|
||||
test/test_submitted_sarif_api.py
|
||||
test/test_types_architecture.py
|
||||
test/test_types_assessment.py
|
||||
@@ -74,11 +81,13 @@ test/test_types_bundle_submission_response_verbose.py
|
||||
test/test_types_error.py
|
||||
test/test_types_freeform_response.py
|
||||
test/test_types_freeform_submission.py
|
||||
test/test_types_message.py
|
||||
test/test_types_patch_submission.py
|
||||
test/test_types_patch_submission_response.py
|
||||
test/test_types_ping_response.py
|
||||
test/test_types_pov_submission.py
|
||||
test/test_types_pov_submission_response.py
|
||||
test/test_types_request_submission.py
|
||||
test/test_types_sarif_assessment_response.py
|
||||
test/test_types_sarif_assessment_submission.py
|
||||
test/test_types_sarif_submission.py
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,42 +16,86 @@
|
||||
|
||||
__version__ = "1.0.0"
|
||||
|
||||
# Define package exports
|
||||
__all__ = [
|
||||
"BroadcastSarifAssessmentApi",
|
||||
"BundleApi",
|
||||
"FreeformApi",
|
||||
"PatchApi",
|
||||
"PingApi",
|
||||
"PovApi",
|
||||
"RequestApi",
|
||||
"SubmittedSarifApi",
|
||||
"ApiResponse",
|
||||
"ApiClient",
|
||||
"Configuration",
|
||||
"OpenApiException",
|
||||
"ApiTypeError",
|
||||
"ApiValueError",
|
||||
"ApiKeyError",
|
||||
"ApiAttributeError",
|
||||
"ApiException",
|
||||
"TypesArchitecture",
|
||||
"TypesAssessment",
|
||||
"TypesBundleSubmission",
|
||||
"TypesBundleSubmissionResponse",
|
||||
"TypesBundleSubmissionResponseVerbose",
|
||||
"TypesError",
|
||||
"TypesFreeformResponse",
|
||||
"TypesFreeformSubmission",
|
||||
"TypesMessage",
|
||||
"TypesPOVSubmission",
|
||||
"TypesPOVSubmissionResponse",
|
||||
"TypesPatchSubmission",
|
||||
"TypesPatchSubmissionResponse",
|
||||
"TypesPingResponse",
|
||||
"TypesRequestSubmission",
|
||||
"TypesSARIFSubmission",
|
||||
"TypesSARIFSubmissionResponse",
|
||||
"TypesSarifAssessmentResponse",
|
||||
"TypesSarifAssessmentSubmission",
|
||||
"TypesSubmissionStatus",
|
||||
]
|
||||
|
||||
# import apis into sdk package
|
||||
from buttercup.orchestrator.competition_api_client.api.broadcast_sarif_assessment_api import BroadcastSarifAssessmentApi
|
||||
from buttercup.orchestrator.competition_api_client.api.bundle_api import BundleApi
|
||||
from buttercup.orchestrator.competition_api_client.api.feeform_api import FeeformApi
|
||||
from buttercup.orchestrator.competition_api_client.api.patch_api import PatchApi
|
||||
from buttercup.orchestrator.competition_api_client.api.ping_api import PingApi
|
||||
from buttercup.orchestrator.competition_api_client.api.pov_api import PovApi
|
||||
from buttercup.orchestrator.competition_api_client.api.submitted_sarif_api import SubmittedSarifApi
|
||||
from buttercup.orchestrator.competition_api_client.api.broadcast_sarif_assessment_api import BroadcastSarifAssessmentApi as BroadcastSarifAssessmentApi
|
||||
from buttercup.orchestrator.competition_api_client.api.bundle_api import BundleApi as BundleApi
|
||||
from buttercup.orchestrator.competition_api_client.api.freeform_api import FreeformApi as FreeformApi
|
||||
from buttercup.orchestrator.competition_api_client.api.patch_api import PatchApi as PatchApi
|
||||
from buttercup.orchestrator.competition_api_client.api.ping_api import PingApi as PingApi
|
||||
from buttercup.orchestrator.competition_api_client.api.pov_api import PovApi as PovApi
|
||||
from buttercup.orchestrator.competition_api_client.api.request_api import RequestApi as RequestApi
|
||||
from buttercup.orchestrator.competition_api_client.api.submitted_sarif_api import SubmittedSarifApi as SubmittedSarifApi
|
||||
|
||||
# import ApiClient
|
||||
from buttercup.orchestrator.competition_api_client.api_response import ApiResponse
|
||||
from buttercup.orchestrator.competition_api_client.api_client import ApiClient
|
||||
from buttercup.orchestrator.competition_api_client.configuration import Configuration
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import OpenApiException
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiTypeError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiValueError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiKeyError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiAttributeError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiException
|
||||
from buttercup.orchestrator.competition_api_client.api_response import ApiResponse as ApiResponse
|
||||
from buttercup.orchestrator.competition_api_client.api_client import ApiClient as ApiClient
|
||||
from buttercup.orchestrator.competition_api_client.configuration import Configuration as Configuration
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import OpenApiException as OpenApiException
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiTypeError as ApiTypeError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiValueError as ApiValueError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiKeyError as ApiKeyError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiAttributeError as ApiAttributeError
|
||||
from buttercup.orchestrator.competition_api_client.exceptions import ApiException as ApiException
|
||||
|
||||
# import models into sdk package
|
||||
from buttercup.orchestrator.competition_api_client.models.types_architecture import TypesArchitecture
|
||||
from buttercup.orchestrator.competition_api_client.models.types_assessment import TypesAssessment
|
||||
from buttercup.orchestrator.competition_api_client.models.types_bundle_submission import TypesBundleSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_bundle_submission_response import TypesBundleSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_bundle_submission_response_verbose import TypesBundleSubmissionResponseVerbose
|
||||
from buttercup.orchestrator.competition_api_client.models.types_error import TypesError
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_response import TypesFreeformResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_submission import TypesFreeformSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_pov_submission import TypesPOVSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_pov_submission_response import TypesPOVSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_patch_submission import TypesPatchSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_patch_submission_response import TypesPatchSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_ping_response import TypesPingResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_submission import TypesSARIFSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_submission_response import TypesSARIFSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_assessment_response import TypesSarifAssessmentResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_assessment_submission import TypesSarifAssessmentSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_submission_status import TypesSubmissionStatus
|
||||
from buttercup.orchestrator.competition_api_client.models.types_architecture import TypesArchitecture as TypesArchitecture
|
||||
from buttercup.orchestrator.competition_api_client.models.types_assessment import TypesAssessment as TypesAssessment
|
||||
from buttercup.orchestrator.competition_api_client.models.types_bundle_submission import TypesBundleSubmission as TypesBundleSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_bundle_submission_response import TypesBundleSubmissionResponse as TypesBundleSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_bundle_submission_response_verbose import TypesBundleSubmissionResponseVerbose as TypesBundleSubmissionResponseVerbose
|
||||
from buttercup.orchestrator.competition_api_client.models.types_error import TypesError as TypesError
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_response import TypesFreeformResponse as TypesFreeformResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_submission import TypesFreeformSubmission as TypesFreeformSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_message import TypesMessage as TypesMessage
|
||||
from buttercup.orchestrator.competition_api_client.models.types_pov_submission import TypesPOVSubmission as TypesPOVSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_pov_submission_response import TypesPOVSubmissionResponse as TypesPOVSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_patch_submission import TypesPatchSubmission as TypesPatchSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_patch_submission_response import TypesPatchSubmissionResponse as TypesPatchSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_ping_response import TypesPingResponse as TypesPingResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_request_submission import TypesRequestSubmission as TypesRequestSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_submission import TypesSARIFSubmission as TypesSARIFSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_submission_response import TypesSARIFSubmissionResponse as TypesSARIFSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_assessment_response import TypesSarifAssessmentResponse as TypesSarifAssessmentResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_assessment_submission import TypesSarifAssessmentSubmission as TypesSarifAssessmentSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_submission_status import TypesSubmissionStatus as TypesSubmissionStatus
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
# import apis into api package
|
||||
from buttercup.orchestrator.competition_api_client.api.broadcast_sarif_assessment_api import BroadcastSarifAssessmentApi
|
||||
from buttercup.orchestrator.competition_api_client.api.bundle_api import BundleApi
|
||||
from buttercup.orchestrator.competition_api_client.api.feeform_api import FeeformApi
|
||||
from buttercup.orchestrator.competition_api_client.api.freeform_api import FreeformApi
|
||||
from buttercup.orchestrator.competition_api_client.api.patch_api import PatchApi
|
||||
from buttercup.orchestrator.competition_api_client.api.ping_api import PingApi
|
||||
from buttercup.orchestrator.competition_api_client.api.pov_api import PovApi
|
||||
from buttercup.orchestrator.competition_api_client.api.request_api import RequestApi
|
||||
from buttercup.orchestrator.competition_api_client.api.submitted_sarif_api import SubmittedSarifApi
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -0,0 +1,340 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
import warnings
|
||||
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from typing_extensions import Annotated
|
||||
|
||||
from pydantic import Field, StrictStr
|
||||
from typing_extensions import Annotated
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_response import TypesFreeformResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_submission import TypesFreeformSubmission
|
||||
|
||||
from buttercup.orchestrator.competition_api_client.api_client import ApiClient, RequestSerialized
|
||||
from buttercup.orchestrator.competition_api_client.api_response import ApiResponse
|
||||
from buttercup.orchestrator.competition_api_client.rest import RESTResponseType
|
||||
|
||||
|
||||
class FreeformApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def v1_task_task_id_freeform_post(
|
||||
self,
|
||||
task_id: Annotated[StrictStr, Field(description="Task ID")],
|
||||
payload: Annotated[TypesFreeformSubmission, Field(description="Submission Body")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TypesFreeformResponse:
|
||||
"""Submit Freeform
|
||||
|
||||
CRSs may submit anything to this endpoint as a PoV. This is particularly useful for unharnessed challenges, but will be open for other challenges also. Freeform PoVs are not evaluated automatically.
|
||||
|
||||
:param task_id: Task ID (required)
|
||||
:type task_id: str
|
||||
:param payload: Submission Body (required)
|
||||
:type payload: TypesFreeformSubmission
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._v1_task_task_id_freeform_post_serialize(
|
||||
task_id=task_id,
|
||||
payload=payload,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "TypesFreeformResponse",
|
||||
'400': "TypesError",
|
||||
'401': "TypesError",
|
||||
'404': "TypesError",
|
||||
'500': "TypesError",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def v1_task_task_id_freeform_post_with_http_info(
|
||||
self,
|
||||
task_id: Annotated[StrictStr, Field(description="Task ID")],
|
||||
payload: Annotated[TypesFreeformSubmission, Field(description="Submission Body")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TypesFreeformResponse]:
|
||||
"""Submit Freeform
|
||||
|
||||
CRSs may submit anything to this endpoint as a PoV. This is particularly useful for unharnessed challenges, but will be open for other challenges also. Freeform PoVs are not evaluated automatically.
|
||||
|
||||
:param task_id: Task ID (required)
|
||||
:type task_id: str
|
||||
:param payload: Submission Body (required)
|
||||
:type payload: TypesFreeformSubmission
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._v1_task_task_id_freeform_post_serialize(
|
||||
task_id=task_id,
|
||||
payload=payload,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "TypesFreeformResponse",
|
||||
'400': "TypesError",
|
||||
'401': "TypesError",
|
||||
'404': "TypesError",
|
||||
'500': "TypesError",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def v1_task_task_id_freeform_post_without_preload_content(
|
||||
self,
|
||||
task_id: Annotated[StrictStr, Field(description="Task ID")],
|
||||
payload: Annotated[TypesFreeformSubmission, Field(description="Submission Body")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""Submit Freeform
|
||||
|
||||
CRSs may submit anything to this endpoint as a PoV. This is particularly useful for unharnessed challenges, but will be open for other challenges also. Freeform PoVs are not evaluated automatically.
|
||||
|
||||
:param task_id: Task ID (required)
|
||||
:type task_id: str
|
||||
:param payload: Submission Body (required)
|
||||
:type payload: TypesFreeformSubmission
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._v1_task_task_id_freeform_post_serialize(
|
||||
task_id=task_id,
|
||||
payload=payload,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "TypesFreeformResponse",
|
||||
'400': "TypesError",
|
||||
'401': "TypesError",
|
||||
'404': "TypesError",
|
||||
'500': "TypesError",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _v1_task_task_id_freeform_post_serialize(
|
||||
self,
|
||||
task_id,
|
||||
payload,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
if task_id is not None:
|
||||
_path_params['task_id'] = task_id
|
||||
# process the query parameters
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
if payload is not None:
|
||||
_body_params = payload
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
if 'Accept' not in _header_params:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
|
||||
# set the HTTP header `Content-Type`
|
||||
if _content_type:
|
||||
_header_params['Content-Type'] = _content_type
|
||||
else:
|
||||
_default_content_type = (
|
||||
self.api_client.select_header_content_type(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
)
|
||||
if _default_content_type is not None:
|
||||
_header_params['Content-Type'] = _default_content_type
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'BasicAuth'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='POST',
|
||||
resource_path='/v1/task/{task_id}/freeform/',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
import warnings
|
||||
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from typing_extensions import Annotated
|
||||
|
||||
from pydantic import Field
|
||||
from typing_extensions import Annotated
|
||||
from buttercup.orchestrator.competition_api_client.models.types_message import TypesMessage
|
||||
from buttercup.orchestrator.competition_api_client.models.types_request_submission import TypesRequestSubmission
|
||||
|
||||
from buttercup.orchestrator.competition_api_client.api_client import ApiClient, RequestSerialized
|
||||
from buttercup.orchestrator.competition_api_client.api_response import ApiResponse
|
||||
from buttercup.orchestrator.competition_api_client.rest import RESTResponseType
|
||||
|
||||
|
||||
class RequestApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def v1_request_delta_post(
|
||||
self,
|
||||
payload: Annotated[TypesRequestSubmission, Field(description="Submission Body")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TypesMessage:
|
||||
"""Send a delta task to the source of this request
|
||||
|
||||
Send a delta task to the source of this request
|
||||
|
||||
:param payload: Submission Body (required)
|
||||
:type payload: TypesRequestSubmission
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._v1_request_delta_post_serialize(
|
||||
payload=payload,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "TypesMessage",
|
||||
'400': "TypesError",
|
||||
'401': "TypesError",
|
||||
'404': "TypesError",
|
||||
'500': "TypesError",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def v1_request_delta_post_with_http_info(
|
||||
self,
|
||||
payload: Annotated[TypesRequestSubmission, Field(description="Submission Body")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TypesMessage]:
|
||||
"""Send a delta task to the source of this request
|
||||
|
||||
Send a delta task to the source of this request
|
||||
|
||||
:param payload: Submission Body (required)
|
||||
:type payload: TypesRequestSubmission
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._v1_request_delta_post_serialize(
|
||||
payload=payload,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "TypesMessage",
|
||||
'400': "TypesError",
|
||||
'401': "TypesError",
|
||||
'404': "TypesError",
|
||||
'500': "TypesError",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def v1_request_delta_post_without_preload_content(
|
||||
self,
|
||||
payload: Annotated[TypesRequestSubmission, Field(description="Submission Body")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""Send a delta task to the source of this request
|
||||
|
||||
Send a delta task to the source of this request
|
||||
|
||||
:param payload: Submission Body (required)
|
||||
:type payload: TypesRequestSubmission
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._v1_request_delta_post_serialize(
|
||||
payload=payload,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "TypesMessage",
|
||||
'400': "TypesError",
|
||||
'401': "TypesError",
|
||||
'404': "TypesError",
|
||||
'500': "TypesError",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _v1_request_delta_post_serialize(
|
||||
self,
|
||||
payload,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
# process the query parameters
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
if payload is not None:
|
||||
_body_params = payload
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
if 'Accept' not in _header_params:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
|
||||
# set the HTTP header `Content-Type`
|
||||
if _content_type:
|
||||
_header_params['Content-Type'] = _content_type
|
||||
else:
|
||||
_default_content_type = (
|
||||
self.api_client.select_header_content_type(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
)
|
||||
if _default_content_type is not None:
|
||||
_header_params['Content-Type'] = _default_content_type
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'BasicAuth'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='POST',
|
||||
resource_path='/v1/request/delta/',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -382,6 +382,10 @@ class ApiClient:
|
||||
else:
|
||||
obj_dict = obj.__dict__
|
||||
|
||||
if isinstance(obj_dict, list):
|
||||
# here we handle instances that can either be a list or something else, and only became a real list by calling to_dict()
|
||||
return self.sanitize_for_serialization(obj_dict)
|
||||
|
||||
return {
|
||||
key: self.sanitize_for_serialization(val)
|
||||
for key, val in obj_dict.items()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -525,7 +525,7 @@ conf = competition_api_client.Configuration(
|
||||
return "Python SDK Debug Report:\n"\
|
||||
"OS: {env}\n"\
|
||||
"Python Version: {pyversion}\n"\
|
||||
"Version of the API: 1.1\n"\
|
||||
"Version of the API: 1.3.0\n"\
|
||||
"SDK Package Version: 1.0.0".\
|
||||
format(env=sys.platform, pyversion=sys.version)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -22,11 +22,13 @@ from buttercup.orchestrator.competition_api_client.models.types_bundle_submissio
|
||||
from buttercup.orchestrator.competition_api_client.models.types_error import TypesError
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_response import TypesFreeformResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_freeform_submission import TypesFreeformSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_message import TypesMessage
|
||||
from buttercup.orchestrator.competition_api_client.models.types_pov_submission import TypesPOVSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_pov_submission_response import TypesPOVSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_patch_submission import TypesPatchSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_patch_submission_response import TypesPatchSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_ping_response import TypesPingResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_request_submission import TypesRequestSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_submission import TypesSARIFSubmission
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_submission_response import TypesSARIFSubmissionResponse
|
||||
from buttercup.orchestrator.competition_api_client.models.types_sarif_assessment_response import TypesSarifAssessmentResponse
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,7 +17,7 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from buttercup.orchestrator.competition_api_client.models.types_submission_status import TypesSubmissionStatus
|
||||
from typing import Optional, Set
|
||||
@@ -28,7 +28,7 @@ class TypesBundleSubmissionResponse(BaseModel):
|
||||
TypesBundleSubmissionResponse
|
||||
""" # noqa: E501
|
||||
bundle_id: StrictStr
|
||||
status: TypesSubmissionStatus
|
||||
status: TypesSubmissionStatus = Field(description="Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded")
|
||||
__properties: ClassVar[List[str]] = ["bundle_id", "status"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,7 +17,7 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from buttercup.orchestrator.competition_api_client.models.types_submission_status import TypesSubmissionStatus
|
||||
from typing import Optional, Set
|
||||
@@ -33,7 +33,7 @@ class TypesBundleSubmissionResponseVerbose(BaseModel):
|
||||
freeform_id: Optional[StrictStr] = None
|
||||
patch_id: Optional[StrictStr] = None
|
||||
pov_id: Optional[StrictStr] = None
|
||||
status: TypesSubmissionStatus
|
||||
status: TypesSubmissionStatus = Field(description="Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded")
|
||||
submitted_sarif_id: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["broadcast_sarif_id", "bundle_id", "description", "freeform_id", "patch_id", "pov_id", "status", "submitted_sarif_id"]
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,7 +17,7 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from buttercup.orchestrator.competition_api_client.models.types_submission_status import TypesSubmissionStatus
|
||||
from typing import Optional, Set
|
||||
@@ -28,7 +28,7 @@ class TypesFreeformResponse(BaseModel):
|
||||
TypesFreeformResponse
|
||||
""" # noqa: E501
|
||||
freeform_id: StrictStr
|
||||
status: TypesSubmissionStatus
|
||||
status: TypesSubmissionStatus = Field(description="Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded")
|
||||
__properties: ClassVar[List[str]] = ["freeform_id", "status"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class TypesMessage(BaseModel):
|
||||
"""
|
||||
TypesMessage
|
||||
""" # noqa: E501
|
||||
message: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["message"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of TypesMessage from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of TypesMessage from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"message": obj.get("message")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class TypesRequestSubmission(BaseModel):
|
||||
"""
|
||||
TypesRequestSubmission
|
||||
""" # noqa: E501
|
||||
duration_secs: Optional[StrictInt] = Field(default=None, description="Time in seconds until a task should expire. If not provided, defaults to 3600.")
|
||||
__properties: ClassVar[List[str]] = ["duration_secs"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of TypesRequestSubmission from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of TypesRequestSubmission from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"duration_secs": obj.get("duration_secs")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -29,7 +29,7 @@ class TypesSarifAssessmentSubmission(BaseModel):
|
||||
TypesSarifAssessmentSubmission
|
||||
""" # noqa: E501
|
||||
assessment: TypesAssessment
|
||||
description: Annotated[str, Field(strict=True, max_length=131072)] = Field(description="Plain text reasoning for the assessment 128KiB max size")
|
||||
description: Annotated[str, Field(strict=True, max_length=131072)] = Field(description="Plain text reasoning for the assessment. Must be nonempty. 128KiB max size")
|
||||
__properties: ClassVar[List[str]] = ["assessment", "description"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,7 +17,7 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from buttercup.orchestrator.competition_api_client.models.types_submission_status import TypesSubmissionStatus
|
||||
from typing import Optional, Set
|
||||
@@ -27,7 +27,7 @@ class TypesSARIFSubmissionResponse(BaseModel):
|
||||
"""
|
||||
TypesSARIFSubmissionResponse
|
||||
""" # noqa: E501
|
||||
status: TypesSubmissionStatus
|
||||
status: TypesSubmissionStatus = Field(description="Schema-compliant submissions will only ever receive the statuses accepted or deadline_exceeded")
|
||||
submitted_sarif_id: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["status", "submitted_sarif_id"]
|
||||
|
||||
|
||||
+2
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -31,6 +31,7 @@ class TypesSubmissionStatus(str, Enum):
|
||||
SubmissionStatusFailed = 'failed'
|
||||
SubmissionStatusDeadlineExceeded = 'deadline_exceeded'
|
||||
SubmissionStatusErrored = 'errored'
|
||||
SubmissionStatusInconclusive = 'inconclusive'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -441,6 +441,7 @@ class Submissions:
|
||||
- V_PATCH_REQUESTED → V_PASSED: Competition API confirms the vulnerability is valid
|
||||
- V_PATCH_REQUESTED → V_FAILED: Competition API rejects the vulnerability
|
||||
- V_PATCH_REQUESTED → V_ERRORED: Competition API reports an error with the vulnerability
|
||||
- V_PATCH_REQUESTED → V_INCONCLUSIVE: Competition API reports that the vulnerability is inconclusive, mark it as V_PASSED (it is going to be reviewed manually)
|
||||
- V_ERRORED → V_ACCEPTED: When resubmission succeeds via _resubmit_errored_submissions()
|
||||
|
||||
Patch States:
|
||||
@@ -457,6 +458,7 @@ class Submissions:
|
||||
- P_ACCEPTED → P_PASSED: Competition API confirms the patch is valid
|
||||
- P_ACCEPTED → P_FAILED: Competition API rejects the patch
|
||||
- P_ACCEPTED → P_ERRORED: Competition API reports an error with the patch
|
||||
- P_ACCEPTED -> P_INCONCLUSIVE: Competition API reports that the patch is inconclusive, mark it as P_FAILED and move to next patch
|
||||
- P_ERRORED → P_ACCEPTED: When resubmission succeeds via _resubmit_errored_patches()
|
||||
- P_ERRORED → P_FAILED: If patch submission fails too many times (patch_submission_attempt_limit reached)
|
||||
|
||||
@@ -703,7 +705,11 @@ class Submissions:
|
||||
"""
|
||||
status = self.competition_api.get_pov_status(_task_id(e), e.pov_id)
|
||||
match status:
|
||||
case TypesSubmissionStatus.SubmissionStatusFailed | TypesSubmissionStatus.SubmissionStatusDeadlineExceeded:
|
||||
case (
|
||||
TypesSubmissionStatus.SubmissionStatusFailed
|
||||
| TypesSubmissionStatus.SubmissionStatusDeadlineExceeded
|
||||
| TypesSubmissionStatus.SubmissionStatusInconclusive
|
||||
):
|
||||
e.state = SubmissionEntry.STOP
|
||||
self._persist(self.redis, i, e)
|
||||
log_structured(
|
||||
@@ -755,8 +761,12 @@ class Submissions:
|
||||
logger.info, _task_id(e), index=i, pov_id=e.pov_id, msg="POV resubmitted, waiting for pass"
|
||||
)
|
||||
|
||||
case TypesSubmissionStatus.SubmissionStatusAccepted:
|
||||
pass
|
||||
case _:
|
||||
assert status == TypesSubmissionStatus.SubmissionStatusAccepted, f"Unexpected POV status: {status}"
|
||||
log_structured(
|
||||
logger.error, _task_id(e), index=i, pov_id=e.pov_id, msg=f"Unexpected POV status: {status}"
|
||||
)
|
||||
|
||||
def _submit_patch(self, i, e):
|
||||
"""
|
||||
@@ -804,6 +814,7 @@ class Submissions:
|
||||
case (
|
||||
TypesSubmissionStatus.SubmissionStatusFailed
|
||||
| TypesSubmissionStatus.SubmissionStatusDeadlineExceeded
|
||||
| TypesSubmissionStatus.SubmissionStatusInconclusive
|
||||
):
|
||||
# Deadline exceeded or failed, move on to next patch (for exceeded we won't try again due to deadline check)
|
||||
e.patch_idx += 1
|
||||
@@ -841,7 +852,14 @@ class Submissions:
|
||||
msg=f"Patch submission failed ({status}), will attempt this patch again (attempt={e.patch_submission_attempt}).",
|
||||
)
|
||||
case _:
|
||||
raise ValueError(f"Unexpected patch status: {status}")
|
||||
log_structured(
|
||||
logger.error,
|
||||
_task_id(e),
|
||||
index=i,
|
||||
pov_id=e.pov_id,
|
||||
patch_idx=e.patch_idx,
|
||||
msg=f"Unexpected patch status: {status}",
|
||||
)
|
||||
|
||||
def _wait_patch_pass(self, i, e):
|
||||
"""
|
||||
@@ -859,7 +877,11 @@ class Submissions:
|
||||
match status:
|
||||
case TypesSubmissionStatus.SubmissionStatusAccepted:
|
||||
return # No change.
|
||||
case TypesSubmissionStatus.SubmissionStatusFailed | TypesSubmissionStatus.SubmissionStatusDeadlineExceeded:
|
||||
case (
|
||||
TypesSubmissionStatus.SubmissionStatusFailed
|
||||
| TypesSubmissionStatus.SubmissionStatusDeadlineExceeded
|
||||
| TypesSubmissionStatus.SubmissionStatusInconclusive
|
||||
):
|
||||
_advance_patch_idx(e)
|
||||
e.state = SubmissionEntry.SUBMIT_PATCH
|
||||
self._persist(self.redis, i, e)
|
||||
@@ -897,7 +919,14 @@ class Submissions:
|
||||
msg="Patch passed, submitting bundle",
|
||||
)
|
||||
case _:
|
||||
raise ValueError(f"Unexpected patch status: {status}")
|
||||
log_structured(
|
||||
logger.error,
|
||||
_task_id(e),
|
||||
index=i,
|
||||
pov_id=e.pov_id,
|
||||
patch_idx=e.patch_idx,
|
||||
msg=f"Unexpected patch status: {status}",
|
||||
)
|
||||
|
||||
def _submit_bundle(self, i: int, e: SubmissionEntry) -> None:
|
||||
"""
|
||||
@@ -917,6 +946,7 @@ class Submissions:
|
||||
case (
|
||||
TypesSubmissionStatus.SubmissionStatusFailed
|
||||
| TypesSubmissionStatus.SubmissionStatusDeadlineExceeded
|
||||
| TypesSubmissionStatus.SubmissionStatusInconclusive
|
||||
):
|
||||
e.state = SubmissionEntry.STOP
|
||||
self._persist(self.redis, i, e)
|
||||
@@ -1018,6 +1048,7 @@ class Submissions:
|
||||
case (
|
||||
TypesSubmissionStatus.SubmissionStatusFailed
|
||||
| TypesSubmissionStatus.SubmissionStatusDeadlineExceeded
|
||||
| TypesSubmissionStatus.SubmissionStatusInconclusive
|
||||
):
|
||||
e.state = SubmissionEntry.STOP
|
||||
self._persist(self.redis, i, e)
|
||||
@@ -1075,6 +1106,7 @@ class Submissions:
|
||||
case (
|
||||
TypesSubmissionStatus.SubmissionStatusFailed
|
||||
| TypesSubmissionStatus.SubmissionStatusDeadlineExceeded
|
||||
| TypesSubmissionStatus.SubmissionStatusInconclusive
|
||||
):
|
||||
e.state = SubmissionEntry.STOP
|
||||
self._persist(self.redis, i, e)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# generated by fastapi-codegen:
|
||||
# filename: /tmp/tmp.0oVFmuzKjt/openapi.json
|
||||
# timestamp: 2025-05-02T05:12:50+00:00
|
||||
# filename: /tmp/tmp.mYpFBeRYQb/openapi.json
|
||||
# timestamp: 2025-05-29T08:37:14+00:00
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# generated by fastapi-codegen:
|
||||
# filename: /tmp/tmp.0oVFmuzKjt/openapi.json
|
||||
# timestamp: 2025-05-02T05:12:50+00:00
|
||||
# filename: /tmp/tmp.mYpFBeRYQb/openapi.json
|
||||
# timestamp: 2025-05-29T08:37:14+00:00
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -63,8 +63,13 @@ class TaskType(Enum):
|
||||
|
||||
class SARIFBroadcast(BaseModel):
|
||||
broadcasts: List[SARIFBroadcastDetail]
|
||||
message_id: str
|
||||
message_time: int
|
||||
message_id: str = Field(
|
||||
...,
|
||||
description='Unique ID for this message. The system will retry sending messages if it does not receive a 200 response code.\nUse this to determine if you have already processed a message.',
|
||||
)
|
||||
message_time: int = Field(
|
||||
..., description='UNIX millisecond timestamp for when the message was sent'
|
||||
)
|
||||
|
||||
|
||||
class SourceDetail(BaseModel):
|
||||
@@ -80,11 +85,11 @@ class StatusState(BaseModel):
|
||||
class TaskDetail(BaseModel):
|
||||
deadline: int = Field(
|
||||
...,
|
||||
description='UNIX timestamp by which any submissions for this task must be in',
|
||||
description='UNIX millisecond timestamp by which any submissions for this task must be in',
|
||||
)
|
||||
focus: str = Field(
|
||||
...,
|
||||
description='Because the challenge task may contain multiple repositories, the folder in the type repo source tarball containing the main project.\nIt is still set when there is only one repository.\n\nThis is the project the CRS is meant to submit vulns, patches, and SARIF assessments against.',
|
||||
description='The folder in the type repo source tarball containing the main project.\n\nThis is the project the CRS is meant to submit vulns, patches, and SARIF assessments against.',
|
||||
)
|
||||
harnesses_included: bool
|
||||
metadata: Dict[str, Any] = Field(
|
||||
@@ -109,7 +114,8 @@ class Status(BaseModel):
|
||||
description='Boolean indicating if the CRS is prepared to work on tasks. Do not return true unless you have successfully tested connectivity to the Competition API via /v1/ping/',
|
||||
)
|
||||
since: int = Field(
|
||||
..., description='Last time task and submission stats were reset'
|
||||
...,
|
||||
description='Last time task and submission stats were reset. Unix timestamp at millisecond resolution.',
|
||||
)
|
||||
state: StatusState = Field(
|
||||
..., description='State of the currently running tasks and submissions'
|
||||
@@ -121,6 +127,11 @@ class Status(BaseModel):
|
||||
|
||||
|
||||
class Task(BaseModel):
|
||||
message_id: str
|
||||
message_time: int
|
||||
message_id: str = Field(
|
||||
...,
|
||||
description='Unique ID for this message. The system will retry sending messages if it does not receive a 200 response code.\nUse this to determine if you have already processed a message.',
|
||||
)
|
||||
message_time: int = Field(
|
||||
..., description='UNIX millisecond timestamp for when the message was sent'
|
||||
)
|
||||
tasks: List[TaskDetail]
|
||||
|
||||
@@ -5,7 +5,7 @@ Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@ Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
import unittest
|
||||
|
||||
from buttercup.orchestrator.competition_api_client.api.freeform_api import FreeformApi
|
||||
|
||||
|
||||
class TestFreeformApi(unittest.TestCase):
|
||||
"""FreeformApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = FreeformApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_v1_task_task_id_freeform_post(self) -> None:
|
||||
"""Test case for v1_task_task_id_freeform_post
|
||||
|
||||
Submit Freeform
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@ Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@ Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
import unittest
|
||||
|
||||
from buttercup.orchestrator.competition_api_client.api.request_api import RequestApi
|
||||
|
||||
|
||||
class TestRequestApi(unittest.TestCase):
|
||||
"""RequestApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = RequestApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_v1_request_delta_post(self) -> None:
|
||||
"""Test case for v1_request_delta_post
|
||||
|
||||
Send a delta task to the source of this request
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -5,7 +5,7 @@ Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from buttercup.orchestrator.competition_api_client.models.types_message import TypesMessage
|
||||
|
||||
class TestTypesMessage(unittest.TestCase):
|
||||
"""TypesMessage unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def make_instance(self, include_optional) -> TypesMessage:
|
||||
"""Test TypesMessage
|
||||
include_optional is a boolean, when False only required
|
||||
params are included, when True both required and
|
||||
optional params are included """
|
||||
# uncomment below to create an instance of `TypesMessage`
|
||||
"""
|
||||
model = TypesMessage()
|
||||
if include_optional:
|
||||
return TypesMessage(
|
||||
message = ''
|
||||
)
|
||||
else:
|
||||
return TypesMessage(
|
||||
)
|
||||
"""
|
||||
|
||||
def testTypesMessage(self):
|
||||
"""Test TypesMessage"""
|
||||
# inst_req_only = self.make_instance(include_optional=False)
|
||||
# inst_req_and_optional = self.make_instance(include_optional=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Example Competition API
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from buttercup.orchestrator.competition_api_client.models.types_request_submission import TypesRequestSubmission
|
||||
|
||||
class TestTypesRequestSubmission(unittest.TestCase):
|
||||
"""TypesRequestSubmission unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def make_instance(self, include_optional) -> TypesRequestSubmission:
|
||||
"""Test TypesRequestSubmission
|
||||
include_optional is a boolean, when False only required
|
||||
params are included, when True both required and
|
||||
optional params are included """
|
||||
# uncomment below to create an instance of `TypesRequestSubmission`
|
||||
"""
|
||||
model = TypesRequestSubmission()
|
||||
if include_optional:
|
||||
return TypesRequestSubmission(
|
||||
duration_secs = 56
|
||||
)
|
||||
else:
|
||||
return TypesRequestSubmission(
|
||||
)
|
||||
"""
|
||||
|
||||
def testTypesRequestSubmission(self):
|
||||
"""Test TypesRequestSubmission"""
|
||||
# inst_req_only = self.make_instance(include_optional=False)
|
||||
# inst_req_and_optional = self.make_instance(include_optional=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
The version of the OpenAPI document: 1.1
|
||||
The version of the OpenAPI document: 1.3.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
|
||||
Reference in New Issue
Block a user