apparmor-language-server

v0.8.2 suspicious
6.0
Medium Risk

Language Server Protocol server for AppArmor profiles

🤖 AI Analysis

Final verdict: SUSPICIOUS

The package shows signs of potential credential harvesting and lacks comprehensive metadata, which raises concerns about its legitimacy and purpose.

  • Potential credential harvesting from accessing sensitive files
  • Incomplete maintainer information and lack of associated GitHub repository
Per-check LLM notes
  • Network: No network calls detected.
  • Shell: Shell execution appears to be related to snapd connectivity check and does not indicate malicious activity.
  • Obfuscation: No obfuscation patterns detected.
  • Credentials: Potential credential harvesting due to references to sensitive files like /etc/passwd.
  • Metadata: The package has no associated GitHub repository and the maintainer's information is incomplete, raising some suspicion but not conclusive evidence of malice.

📦 Package Quality Overall: Medium (5.2/10)

✦ High Test Suite 9.0

Test suite present — 19 test file(s) found

  • Test runner config found: pyproject.toml
  • 19 test file(s) detected (e.g. test_call_hierarchy.py)
◈ Medium Documentation 5.0

Some documentation present

  • Detailed PyPI description (48206 chars)
○ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
◈ Medium Type Annotations 7.0

Partial type annotation coverage

  • Type checker (mypy / pyright / pytype) referenced in project
  • 563 type-annotated function signatures detected in source
○ Low Multiple Contributors 1.0

Unable to verify contributor count: no GitHub repository found

  • No GitHub repository linked — contributor count unavailable

🔬 Heuristic Checks

Outbound Network Calls

No suspicious network call patterns found

Code Obfuscation

No obfuscation patterns detected

Shell / Subprocess Execution score 4.0

Found 2 shell execution pattern(s)

  • afe pattern. result = subprocess.run( # nosec B603 ["/usr/bin/snapctl", "is-connecte
  • lse is fine. result = subprocess.run( # nosec B603 args, **run_kwargs,
Credential Harvesting score 10.0

Found 6 credential access pattern(s)

  • ssion.\n\n" "```\n/etc/passwd r,\nfile rw /var/log/**,\n```\n\n" ), detai
  • ne", [ " /etc/passwd ", " file /etc/passwd r", " file
  • passwd ", " file /etc/passwd r", " file ", " file r",
  • n/myapp flags=({flags}) {{\n /etc/passwd r,\n}}\n" doc, _ = parse_document("file:///test", s
  • n/docker) {\n" " /etc/passwd r,\n" "}\n" ) doc, _ = parse_do
  • ile myapp /usr/bin/myapp {\n /etc/passwd r,\n}\n" doc, _ = parse_document("file:///test", sr
Typosquatting

No typosquatting candidates detected

Registered Email Domain

No author email provided

Suspicious Page Links

All external links appear legitimate

Git Repository History

No GitHub repository linked

  • No GitHub repository link found
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 apparmor-language-server
Create a command-line tool called 'AppArmorAssistant' that helps system administrators manage and validate AppArmor security profiles more efficiently. This tool will leverage the 'apparmor-language-server' package to provide intelligent suggestions, syntax validation, and linting capabilities directly within a user-friendly CLI interface.

The core functionalities of 'AppArmorAssistant' include:
1. **Profile Validation**: Automatically validate an AppArmor profile against the AppArmor language specification using the 'apparmor-language-server'. If any issues are found, they should be displayed in a human-readable format.
2. **Linting Suggestions**: Provide linting suggestions to improve the quality and readability of the AppArmor profiles. For example, suggesting the use of more specific paths or recommending the use of built-in file permissions.
3. **Interactive Mode**: Allow users to interactively edit their AppArmor profiles, with real-time feedback on potential errors and improvements as they type. This feature should integrate seamlessly with the 'apparmor-language-server' to provide instant suggestions.
4. **Profile Comparison**: Compare two different AppArmor profiles and highlight differences between them, which can be particularly useful when reviewing changes made over time or comparing profiles from different systems.
5. **Documentation Integration**: Integrate with the official AppArmor documentation to provide quick access to relevant sections from within the CLI, helping users understand and implement best practices.

To utilize the 'apparmor-language-server', you'll need to establish a connection to its Language Server Protocol (LSP) endpoint. This involves setting up a client in your Python application that can send requests to the server for validation, linting, and other operations. Ensure that your application handles responses appropriately and presents the information in a clear, actionable way to the end-user.