StrictMock

v0.5.0 suspicious
6.0
Medium Risk

Highly Deterministic Mocking

🤖 AI Analysis

Final verdict: SUSPICIOUS

The package shows signs of potential obfuscation and lacks proper metadata, raising concerns about its legitimacy and intent.

  • High obfuscation risk due to use of eval()
  • Lack of maintainer information
Per-check LLM notes
  • Network: No network calls detected, which is normal for most utility packages like StrictMock.
  • Shell: No shell execution patterns detected, consistent with the expected behavior of a mocking library.
  • Obfuscation: The use of eval() with annotations and in conjunction with creating classes across files suggests an attempt at obfuscation rather than legitimate functionality.
  • Credentials: No clear patterns indicating credential harvesting were detected.
  • Metadata: The package shows several low-effort signs and lacks important maintainer information, raising some suspicion but not conclusive evidence of malice.

🔬 Heuristic Checks

Outbound Network Calls

No suspicious network call patterns found

Code Obfuscation score 10.0

Found 6 obfuscation pattern(s)

  • annotation strings passed to eval(). # Permits identifiers, brackets, commas, spaces, and pipe
  • = inspect.Parameter.empty # eval() has a bit of fun. All of the types that are in the file w
  • that are in the file where # eval() resides are available for it to use. # which gets real fun
  • to create a class that calls eval() # in a different file. Suddenly you lose all the context
  • g name to the proper type. # eval() is only needed if there are more complicated types. For e
  • a Union or Optional, and then eval() the # result to create a proper type. # Check Type is us
Shell / Subprocess Execution

No shell execution patterns detected

Credential Harvesting

No credential harvesting patterns detected

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 8.0

4 maintainer concern(s) found

  • Only one version has ever been released — brand new package
  • Author name is missing or very short
  • Author "" appears to have only 1 package on PyPI (new or inactive account)
  • Package has no PyPI classifiers (low effort / metadata quality)
Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with StrictMock
Your task is to develop a mini-application called 'TestHarness' which will serve as a simplified testing framework for other developers to use when writing unit tests for their Python applications. This application should leverage the 'StrictMock' package to ensure that all mocked objects behave exactly as expected during testing, thus enhancing the reliability of the tests.

The 'TestHarness' application should include the following key features:
1. **Configuration Setup**: Allow users to configure test cases, including specifying which functions or methods to mock and under what conditions.
2. **Mock Object Creation**: Automatically create mock objects based on the configuration provided. These mocks should strictly adhere to the behavior defined in the configuration, ensuring no unexpected behavior during tests.
3. **Test Execution**: Execute the user's test suite with the mocked objects in place, logging any discrepancies between the expected and actual behavior of the mocks.
4. **Report Generation**: After test execution, generate a comprehensive report detailing any issues found during the testing phase, focusing particularly on any deviations from the strict mocking behavior.
5. **User Interface**: Provide a simple command-line interface (CLI) for interacting with the 'TestHarness'. This CLI should support commands like configuring tests, running tests, and viewing reports.

To utilize the 'StrictMock' package effectively, follow these steps within your application:
- Use 'StrictMock' to define the expected behavior of each function or method being mocked. This includes specifying return values, side effects, and exceptions that should be raised under certain conditions.
- Ensure that 'StrictMock' enforces strict adherence to the defined behavior, preventing any unmocked calls or unexpected interactions with real objects during the test execution phase.
- Leverage 'StrictMock's deterministic nature to ensure that every test run produces consistent results, reducing variability in test outcomes due to external factors.

By the end of this project, you should have a functional 'TestHarness' application that not only simplifies the process of setting up and running unit tests but also enhances the reliability of those tests through the use of highly deterministic mocking.