Skip to content

feat(CIS): Add Support for AI Security for Apps - #338

Open
sridhargk wants to merge 2 commits into
masterfrom
ai-security-for-apps
Open

sridhargk wants to merge 2 commits into
masterfrom
ai-security-for-apps

Conversation

@sridhargk

Copy link
Copy Markdown
Collaborator

PR summary

Fixes: AI Security for Apps

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Signed-off-by: Sridhar G K <gksridhar09@gmail.com>
@sridhargk sridhargk self-assigned this Sep 21, 2026
… label response handling

Signed-off-by: Sridhar G K <gksridhar09@gmail.com>
@sridhargk
sridhargk marked this pull request as ready for review September 23, 2026 22:13
@sridhargk

Copy link
Copy Markdown
Collaborator Author

Test Execution Results:

❯ npx jest test/unit/cis/ai-security-for-apps.v1.test.js
 PASS  test/unit/cis/ai-security-for-apps.v1.test.js
  AiSecurityForAppsV1
    the newInstance method
      ✓ should use defaults when options not provided (2 ms)
      ✓ should set serviceName, serviceUrl, and authenticator when provided
    the constructor
      ✓ use user-given service url
      ✓ use default service url
    service-level tests
      positive tests
        ✓ construct service with global params (1 ms)
    getAiSecuritySettings
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries (1 ms)
        ✓ should prioritize user-given headers (1 ms)
        ✓ should not have any problems when no parameters are passed in
    replaceZoneAiSecuritySettings
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries (1 ms)
        ✓ should prioritize user-given headers (1 ms)
        ✓ should not have any problems when no parameters are passed in
    getApiGatewayDiscovery
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries (1 ms)
        ✓ should prioritize user-given headers
        ✓ should not have any problems when no parameters are passed in (2 ms)
    listApiGatewayDiscoveryOperations
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries (1 ms)
        ✓ should prioritize user-given headers
        ✓ should not have any problems when no parameters are passed in
    updateZoneApiGatewayDiscoveryOperation
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries
        ✓ should prioritize user-given headers (1 ms)
        ✓ should not have any problems when no parameters are passed in
    createZoneApiGatewayOperation
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries
        ✓ should prioritize user-given headers (1 ms)
        ✓ should not have any problems when no parameters are passed in
    createApiGatewayOperationItem
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries
        ✓ should prioritize user-given headers
        ✓ should not have any problems when no parameters are passed in
    updateApiGatewayOperationLabels
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries (1 ms)
        ✓ should prioritize user-given headers
        ✓ should not have any problems when no parameters are passed in
    getZoneApiGatewayOperation
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries
        ✓ should prioritize user-given headers
      negative tests
        ✓ should enforce required parameters (1 ms)
        ✓ should reject promise when required params are not given
    deleteZoneApiGatewayOperation
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries
        ✓ should prioritize user-given headers
      negative tests
        ✓ should enforce required parameters (1 ms)
        ✓ should reject promise when required params are not given
    getApiGatewaySchemas
      positive tests
        ✓ should pass the right params to createRequest with enable and disable retries
        ✓ should prioritize user-given headers
        ✓ should not have any problems when no parameters are passed in

--------------------------|---------|----------|---------|---------|----------------------------------------
File                      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                      
--------------------------|---------|----------|---------|---------|----------------------------------------
All files                 |   95.59 |    81.42 |     100 |   95.57 |                                        
 cis/ai-security-for-apps |   95.39 |    81.42 |     100 |   95.37 |                                        
  v1.ts                   |   95.39 |    81.42 |     100 |   95.37 | 99,132,185,247,313,381,440,498,563,733 
 lib                      |     100 |      100 |     100 |     100 |                                        
  common.ts               |     100 |      100 |     100 |     100 |                                        
--------------------------|---------|----------|---------|---------|----------------------------------------
Test Suites: 1 passed, 1 total
Tests:       40 passed, 40 total
Snapshots:   0 total
Time:        0.214 s, estimated 1 s
Ran all test suites matching test/unit/cis/ai-security-for-apps.v1.test.js.
❯ npx jest test/integration/cis/ai-security-for-apps.v1.test.js
 PASS  test/integration/cis/ai-security-for-apps.v1.test.js (27.311 s)
  AiSecurityForAppsV1
    ✓ Initialize service (2 ms)
    AI Security Settings
      ✓ should get AI security settings (3545 ms)
      ✓ should update AI security settings (2994 ms)
    API Gateway Discovery
      ✓ should get API Gateway discovery (829 ms)
      ✓ should list API Gateway discovery operations (730 ms)
    API Gateway Schemas
      ✓ should get API Gateway schemas (1028 ms)
    API Gateway Operations - Single operation lifecycle
      ✓ Create a single API Gateway operation, retrieve it by operation ID, delete it, and verify deletion (8319 ms)
    API Gateway Operations - Bulk lifecycle
      ✓ Scenario 1: Create 3 operations in bulk and retrieve the second one (2639 ms)
      ✓ Scenario 2: Update operation labels — add to all, remove one, verify label persists for remaining (1916 ms)
      ✓ Scenario 3: Delete all bulk-created operations (5125 ms)

--------------------------|---------|----------|---------|---------|-----------------------------------------------------------
File                      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                         
--------------------------|---------|----------|---------|---------|-----------------------------------------------------------
All files                 |   89.42 |    71.42 |   96.77 |   89.38 |                                                           
 cis/ai-security-for-apps |   88.94 |    71.42 |   96.66 |   88.88 |                                                           
  v1.ts                   |   88.94 |    71.42 |   96.66 |   88.88 | 65,99,105,132,185,247,313,376-416,440,498,563,624,678,733 
 lib                      |     100 |      100 |     100 |     100 |                                                           
  common.ts               |     100 |      100 |     100 |     100 |                                                           
--------------------------|---------|----------|---------|---------|-----------------------------------------------------------
Test Suites: 1 passed, 1 total
Tests:       10 passed, 10 total
Snapshots:   0 total
Time:        27.364 s, estimated 29 s
Ran all test suites matching test/integration/cis/ai-security-for-apps.v1.test.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant