ast-serialize

v0.5.0 suspicious
4.0
Medium Risk

Python bindings for mypy AST serialization

🤖 AI Analysis

Final verdict: SUSPICIOUS

The package shows no immediate signs of malicious activity, but the incomplete metadata and potentially inactive author raise concerns about its origin and maintenance.

  • Incomplete author metadata
  • Potentially inactive author
Per-check LLM notes
  • Network: No network calls detected, which is normal for a package focused on serialization.
  • Shell: No shell execution patterns detected, aligning with the expected behavior of a serialization-focused package.
  • Obfuscation: No obfuscation patterns detected, indicating low risk of malicious obfuscation.
  • Credentials: No credential harvesting patterns detected, indicating low risk of malicious credential theft.
  • Metadata: The author's information is incomplete and they may be new or inactive, which raises some suspicion but does not strongly indicate malice.

📦 Package Quality Overall: Medium (6.0/10)

◈ Medium Test Suite 6.0

Partial test coverage signals detected

  • 1 test file(s) detected (e.g. test_ast_serialize.py)
◈ Medium Documentation 5.0

Some documentation present

  • Brief PyPI description (335 chars)
○ Low Contributing Guide 2.0

No contributing guide or governance files found

  • No CONTRIBUTING, CODE_OF_CONDUCT, or governance files found
◈ Medium Type Annotations 7.0

Partial type annotation coverage

  • Classifier: Typing :: Typed
  • Type checker (mypy / pyright / pytype) referenced in project
✦ High Multiple Contributors 10.0

Active multi-contributor project

  • 7 unique contributor(s) across 100 commits in mypyc/ast_serialize
  • Active community — 5 or more distinct contributors

🔬 Heuristic Checks

Outbound Network Calls

No suspicious network call patterns found

Code Obfuscation

No obfuscation patterns detected

Shell / Subprocess Execution

No shell execution patterns detected

Credential Harvesting

No credential harvesting patterns detected

Typosquatting

No typosquatting candidates detected

Registered Email Domain

Email domain looks legitimate: iki.fi>

Suspicious Page Links

All external links appear legitimate

Git Repository History

Repository mypyc/ast_serialize appears legitimate

Maintainer History score 4.0

2 maintainer concern(s) found

  • Author name is missing or very short
  • Author "" appears to have only 1 package on PyPI (new or inactive account)
Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with ast-serialize
Create a Python-based code analysis tool named 'CodeInspector' that leverages the 'ast-serialize' package to serialize and deserialize Python Abstract Syntax Trees (ASTs). This tool will enable developers to inspect and manipulate Python code at a structural level. Here are the steps and features to implement:

1. **Setup**: Install necessary packages including 'ast-serialize'.
2. **Serialization Functionality**: Implement functions to serialize Python code snippets into their AST representation using 'ast-serialize'. This allows the user to see the underlying structure of the provided code.
3. **Deserialization Functionality**: Add functionality to take serialized AST data and convert it back into Python code. This feature will help users understand how changes in the AST affect the final output.
4. **Code Transformation**: Allow users to modify the serialized AST (e.g., adding comments, changing variable names, etc.) and then deserializing it back to code to see the effect of these transformations.
5. **Visualization**: Integrate a simple visualization component that displays the AST as a tree structure, making it easier for users to comprehend the code structure visually.
6. **Command-Line Interface (CLI)**: Develop a CLI where users can input Python code, view its AST, make modifications, and get the updated code output.
7. **Documentation**: Provide comprehensive documentation on how to use 'CodeInspector', including examples and best practices for working with ASTs.

The goal is to create a versatile tool that not only serves as an educational resource but also assists in code optimization and debugging processes.

💬 Discussion Feed

Leave a comment

No discussion yet. Be the first to share your thoughts!