Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Packs/helloPack/Scripts/HelloPackScript/HelloPackScript.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def main():
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  • Missing essential XSOAR imports.
  • Add a docstring to the main() function.
  • Implement error handling in the main() function.

print("hello")

Check failure on line 2 in Packs/helloPack/Scripts/HelloPackScript/HelloPackScript.py

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

XSOAR Linter E9002

main: Print is found, Please remove all prints from the code.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Missing error handling and incorrect output mechanism.



if __name__ in ("__main__", "__builtin__", "builtins"):
main()
9 changes: 9 additions & 0 deletions Packs/helloPack/Scripts/HelloPackScript/HelloPackScript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
commonfields:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The script YAML is missing required top-level fields: dockerimage, fromversion, and tests. Please add them to ensure proper execution, platform compatibility, and testing standards.

For example:

dockerimage: demisto/python3:x.y.z
fromversion: 6.0.0
tests:
- No tests

id: HelloPackScript
version: -1
name: HelloPackScript
script: '-'
type: python
subtype: python3
comment: A simple hello script for testing
enabled: true
20 changes: 20 additions & 0 deletions Packs/helloPack/pack_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The mandatory key created is missing from the pack metadata.

"name": "helloPack",
"description": "Test pack for automated PR testing",
"support": "xsoar",
"currentVersion": "1.0.0",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
"categories": [
"Utilities"
],
"tags": [],
"useCases": [],
"keywords": [],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The vendor name (e.g., 'Cortex') must be included in the keywords list.

"marketplaces": [
"xsoar",
"marketplacev2",
"platform"
]
}
Loading