Skip to main content

Detect suspicious behaviors in git repos and open-source projects.

Project description

defected

Build PyPI PyPI - Python Version PyPI - Status Downloads Downloads

Defected is a CLI tool designed to analyze Git logs and detect suspicious behaviors, such as frequent timezone changes, to enhance the security and reliability of open-source projects.

Open source projects thrive on collaboration, but their openness comes with risks. Contributors may unknowingly or intentionally exhibit suspicious behaviors, such as:

  • Frequent timezone changes in their commit metadata.
  • Working at unusual hours or during public holidays.
  • Unusual patterns in commit activity.

These anomalies could indicate automation scripts, compromised accounts, or malicious actions.

Defected is a CLI tool designed to help maintainers detect and flag suspicious commit patterns. By analyzing Git logs, Defected provides insights into contributors’ behaviors, helping ensure the security and integrity of your project.

We can think of Defected as an OSINT tool that can used by project maintainers to fight against social engineering.

Visit the official documentation.

Install

$ pip install defected

Usage

$ defected -h

Examples of usage and documentation of available commands are available in the official documentation.

The Problem

Most open source projects rely on volunteers, but not all volunteers are all well intentioned. Strategic, financial, or again geopolical aspect made that some actors seek to profit from open source project to carry out their hidden agenda.

Bad actors have interest in open source to introduce exploits, backdoors, or payloads, or even to scuttle projects.

It expose users of open source projects to threats. Such kind of social engineering can lead users to data leak, invasion of privacy, and lot nightmare scenarios.

As maintainers of these projects we are responsible of the safety of people that who trusted in our work.

Goal

The goal of defected is to highlight potential social engineering threats.

Defected addresses these challenges by:

  • Detecting frequent timezone changes in commit metadata.
  • Highlighting contributors with irregular commit patterns.
  • Flagging potential risks for maintainers to investigate.
  • Providing clear and exportable reports for further analysis.

Features

  1. Easy-to-Use CLI:
    • Installable via PyPI, Defected is simple to run directly from your terminal.
  2. Commit Metadata Analysis:
    • Extracts author, email, date, and timezone data from Git logs.
  3. Timezone Change Detection:
    • Flags contributors exceeding a configurable threshold of timezone changes.
  4. Customizable Options:
    • Adjust thresholds, filter suspicious results.
  5. Exportable Reports:
    • Saves results in CSV format for further analysis.

Contributing

We welcome contributions to Defected!

To contribute:

  1. Fork the repository;
  2. Create a feature branch;
  3. Introduce your changes;
  4. Submit a pull request with a detailed description of your changes.

License

Defected is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

This project is inspired by the open source community and aims to empower maintainers with tools to ensure project security and integrity.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

defected-0.5.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

defected-0.5.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file defected-0.5.0.tar.gz.

File metadata

  • Download URL: defected-0.5.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for defected-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f499b882a0291aa4dbd5af927cee6e365c3635f2c808ae0f79976e200e1b7a8c
MD5 1720a0f9a5982d433e6e20a6884a8ae0
BLAKE2b-256 0686258f725aa074692781e57ff0bdcd38b5b0f4c4623fe9a0c4c22d51188090

See more details on using hashes here.

Provenance

The following attestation bundles were made for defected-0.5.0.tar.gz:

Publisher: main.yml on 4383/defected

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file defected-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: defected-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for defected-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4463c1e8b9ff9d20bc83c9cf16c161762b88dd226f671d14879c102249728a7a
MD5 33fba076bd52a0fba2325e11629b7623
BLAKE2b-256 93724078e9c9b55c08ec600315eed13aecd4b60fe5f987becc1a3d7ad0714c95

See more details on using hashes here.

Provenance

The following attestation bundles were made for defected-0.5.0-py3-none-any.whl:

Publisher: main.yml on 4383/defected

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page