Skip to content

Conversation

marksokolov-orca
Copy link

@marksokolov-orca marksokolov-orca commented Sep 29, 2025

  • OpenAPI: Improve global security field detection with operation-level security checks
  • ServerlessFW/SAM: Add contextual intelligence for IAM role requirements
  • S3 Bucket: Add intentional public bucket detection for Terraform/CloudFormation
  • Variable Description: Focus on complex/sensitive variables only
  • Snake Case: Exclude external modules and legitimate naming exceptions
  • K8s Namespace: Distinguish user workloads from system components
  • Documentation: Enhanced rule comments with security rationale and compliance alignment

Reason for Proposed Changes

  • Reduce false positives in KICS security rules by adding contextual intelligence
  • Improve rule accuracy to focus on genuine security vulnerabilities
  • Enhance developer experience by reducing noise from legitimate use cases
  • Align rules with modern cloud security best practices and industry standards
  • Maintain security coverage while being more precise in detection logic

Proposed Changes

  • OpenAPI Global Security Field: Enhanced to only flag when both global security is missing AND operations lack security
  • ServerlessFW/SAM IAM Role: Added contextual analysis for functions requiring different permissions
  • S3 Bucket Public Policy: Added detection for intentional public buckets (websites, CDNs) to reduce false positives
  • Variable Description: Focused on complex/sensitive variables only, excluding simple self-explanatory ones
  • Snake Case Naming: Added exceptions for external modules and legitimate naming patterns
  • Kubernetes Namespace: Distinguished between user workloads and system components
  • Test Coverage: Added comprehensive negative test cases and updated expected results
  • Documentation: Enhanced rule comments with security rationale and compliance alignment

I submit this contribution under the Apache-2.0 license.

- OpenAPI: Improve global security field detection with operation-level security checks
- ServerlessFW/SAM: Add contextual intelligence for IAM role requirements
- S3 Bucket: Add intentional public bucket detection for Terraform/CloudFormation
- Variable Description: Focus on complex/sensitive variables only
- Snake Case: Exclude external modules and legitimate naming exceptions
- K8s Namespace: Distinguish user workloads from system components
- Volume Mount: Revert to original broader detection (as requested)

All rules now provide enhanced contextual intelligence while maintaining security coverage.
Tests updated and validated for all modified rules.
@marksokolov-orca marksokolov-orca requested a review from a team as a code owner September 29, 2025 14:17
@github-actions github-actions bot added community Community contribution cloudformation CloudFormation query terraform Terraform query openapi OpenAPI query kubernetes Kubernetes query labels Sep 29, 2025
@marksokolov-orca marksokolov-orca changed the title Enhance rule accuracy and reduce false positives enhance rule accuracy and reduce false positives Sep 29, 2025
@marksokolov-orca marksokolov-orca changed the title enhance rule accuracy and reduce false positives feat(queries): enhance rule accuracy and reduce false positives Sep 29, 2025
@github-actions github-actions bot added feature request Community: new feature request query New query feature labels Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloudformation CloudFormation query community Community contribution feature request Community: new feature request kubernetes Kubernetes query openapi OpenAPI query query New query feature terraform Terraform query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant