Skip to content

Fix panw-prisma-airs manifest.json to use proper JSON schema format #1128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jroberts2600
Copy link
Contributor

Description

Motivation

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

How Has This Been Tested?

  • Unit Tests
  • Integration Tests
  • Manual Testing

Screenshots (if applicable)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Related Issues

Copy link

matter-code-review bot commented Jun 9, 2025

Code Quality bug fix type-safety

Description

Summary By MatterAI MatterAI logo

🔄 What Changed

This Pull Request modifies the plugins/panw-prisma-airs/manifest.json file. The credentials section has been updated from an array of credential objects to a proper JSON schema object definition. Specifically, the AIRS_API_KEY credential is now defined within a properties object, specifying its type, label, description, and encrypted status. The required field for credentials is now an array within the credentials object.

🔍 Impact of the Change

This change fixes an improper JSON schema format in the manifest.json file, ensuring that the credential definition for the PANW Prisma AIRS Guardrail plugin adheres to the expected structure. This improves the robustness and maintainability of the plugin's configuration, preventing potential parsing errors or misinterpretations by the plugin loading system. It ensures proper handling and validation of the AIRS_API_KEY.

📁 Total Files Changed

1 file changed (plugins/panw-prisma-airs/manifest.json)

🧪 Test Added

N/A - No specific tests were added or mentioned in the PR description. For a manifest change, integration tests verifying plugin loading and credential handling would be beneficial.

🔒Security Vulnerabilities

No new security vulnerabilities were detected in this change. The update improves the definition of an encrypted credential, which is a positive step for security configuration.

Motivation

This change is needed to correct the manifest.json to use a proper JSON schema format for defining credentials, ensuring correct parsing and validation by the system.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

How Has This Been Tested?

  • Unit Tests: N/A
  • Integration Tests: N/A
  • Manual Testing: N/A

Screenshots (if applicable)

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

totalScore: 3

Tip

Quality Recommendations

  1. Ensure automated schema validation is in place for manifest.json files to prevent future format deviations.

  2. Consider adding integration tests to verify that plugins load correctly with the updated manifest schema.

Sequence Diagram

sequenceDiagram
    participant User as User/Developer
    participant System as Plugin System/Runtime
    participant ManifestFile as manifest.json
    participant CredentialManager as Credential Manager

    User->>ManifestFile: Updates manifest.json (PR change)
    ManifestFile-->>System: Provides updated manifest.json
    System->>System: Reads and parses manifest.json
    System->>CredentialManager: Passes "credentials" definition (new schema)
    CredentialManager->>CredentialManager: Validates and processes credential schema
    CredentialManager-->>System: Confirms credential definition loaded
    System->>System: Configures plugin with AIRS_API_KEY based on schema
Loading

Copy link

@matter-code-review matter-code-review bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR updates the PANW Prisma AIRS plugin manifest to use proper JSON schema format. The changes look good overall, with improved security by marking the API key as encrypted and better documentation for users.

Comment on lines +5 to +16
"credentials": {
"type": "object",
"properties": {
"AIRS_API_KEY": {
"type": "string",
"label": "AIRS API Key",
"description": "The API key for Palo Alto Networks Prisma AI Runtime Security",
"encrypted": true
}
},
"required": ["AIRS_API_KEY"]
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Code Refactor

Issue: The credentials schema has been updated to use proper JSON schema format, but it could benefit from a default value or example to improve developer experience.
Fix: Adding an example value would help developers understand the expected format of the API key.
Impact: Improves developer experience and reduces potential configuration errors.

Suggested change
"credentials": {
"type": "object",
"properties": {
"AIRS_API_KEY": {
"type": "string",
"label": "AIRS API Key",
"description": "The API key for Palo Alto Networks Prisma AI Runtime Security",
"encrypted": true
}
},
"required": ["AIRS_API_KEY"]
},
\"credentials\": {
\"type\": \"object\",
\"properties\": {
\"AIRS_API_KEY\": {
\"type\": \"string\",
\"label\": \"AIRS API Key\",
\"description\": \"The API key for Palo Alto Networks Prisma AI Runtime Security\",
\"encrypted\": true,
\"example\": \"airs_api_xxxxxxxxxxxx\"
}
},
\"required\": [\"AIRS_API_KEY\"]
},

@VisargD VisargD merged commit 0ab3317 into Portkey-AI:main Jun 11, 2025
2 checks passed
Copy link

Important

PR Review Skipped

PR review skipped as per the configuration setting. Run a manually review by commenting /matter review

💡Tips to use Matter AI

Command List

  • /matter summary: Generate AI Summary for the PR
  • /matter review: Generate AI Reviews for the latest commit in the PR
  • /matter review-full: Generate AI Reviews for the complete PR
  • /matter release-notes: Generate AI release-notes for the PR
  • /matter : Chat with your PR with Matter AI Agent
  • /matter remember : Generate AI memories for the PR
  • /matter explain: Get an explanation of the PR
  • /matter help: Show the list of available commands and documentation
  • Need help? Join our Discord server: https://discord.gg/fJU5DvanU3

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.

4 participants