Skip to content

bug(scan): false positive: "Operation Object should have at least one successful HTTP status code defined" on 204 #7600

@jcb-entrnce

Description

@jcb-entrnce

Expected Behavior

When an OpenAPI HTTP status 204 is present in the operation, the scan should not report an issue based on query 48e9e1fe-cf79-45b5-93e6-8b55ae5dadfd ("Operation Without Successful HTTP Status Code (v3)").

Actual Behavior

The scan reports the following issue:

  Scanning with Keeping Infrastructure as Code Secure v2.1.10
  
  
  
  
  
  Operation Without Successful HTTP Status Code (v3), Severity: INFO, Results: 1
  Description: Operation Object should have at least one successful HTTP status code defined
  Platform: OpenAPI
  CWE: 710
  Learn more about this vulnerability: https://docs.kics.io/latest/queries/openapi-queries/48e9e1fe-cf79-45b5-93e6-8b55ae5dadfd
  
  	[1]: <redacted for github>.yaml:64
  
  		063:       operationId: <redacted for github>
  		064:       responses:
  		065:         204:

Scanned file:
openapi.yaml.txt

Steps to Reproduce the Problem

Run the scan

Specifications

(N/A if not applicable)

  • Version: 2.1.10
  • Platform: Ubuntu 24.04.2 LTS (GitHub Actions)
  • Subsystem:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcommunityCommunity contributionopenapiOpenAPI queryqueryNew query feature

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions