Detect suspicious behaviors in git repos and open-source projects.
Project description
defected
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
- Easy-to-Use CLI:
- Installable via PyPI, Defected is simple to run directly from your terminal.
- Commit Metadata Analysis:
- Extracts author, email, date, and timezone data from Git logs.
- Timezone Change Detection:
- Flags contributors exceeding a configurable threshold of timezone changes.
- Customizable Options:
- Adjust thresholds, filter suspicious results.
- Exportable Reports:
- Saves results in CSV format for further analysis.
Contributing
We welcome contributions to Defected!
To contribute:
- Fork the repository;
- Create a feature branch;
- Introduce your changes;
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file defected-0.4.2.tar.gz.
File metadata
- Download URL: defected-0.4.2.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73bb65506e1230851e7918e661f69939c87050effb3b2c00750a6128577a5872
|
|
| MD5 |
57bb317b68a5684eaf05b78797b422ad
|
|
| BLAKE2b-256 |
cdd780216e7b795e94e6be22f52a2eeb3a7b8996a41f3f14b4425127fd69974a
|
Provenance
The following attestation bundles were made for defected-0.4.2.tar.gz:
Publisher:
main.yml on 4383/defected
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
defected-0.4.2.tar.gz -
Subject digest:
73bb65506e1230851e7918e661f69939c87050effb3b2c00750a6128577a5872 - Sigstore transparency entry: 152450391
- Sigstore integration time:
-
Permalink:
4383/defected@72dec3a1247e9e0c0df6f5b3e14742a6704b5793 -
Branch / Tag:
refs/tags/0.4.2 - Owner: https://github.com/4383
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@72dec3a1247e9e0c0df6f5b3e14742a6704b5793 -
Trigger Event:
push
-
Statement type:
File details
Details for the file defected-0.4.2-py3-none-any.whl.
File metadata
- Download URL: defected-0.4.2-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e828db78e150a716d49c92648db7968541430bc16b53d8e0285baffd4cf79cb
|
|
| MD5 |
c64546d25115164ef90c206422109dff
|
|
| BLAKE2b-256 |
7bfa3579c63b3e1781b03e4578eb3092ca570e2f973d264478928ef14eedf19e
|
Provenance
The following attestation bundles were made for defected-0.4.2-py3-none-any.whl:
Publisher:
main.yml on 4383/defected
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
defected-0.4.2-py3-none-any.whl -
Subject digest:
4e828db78e150a716d49c92648db7968541430bc16b53d8e0285baffd4cf79cb - Sigstore transparency entry: 152450392
- Sigstore integration time:
-
Permalink:
4383/defected@72dec3a1247e9e0c0df6f5b3e14742a6704b5793 -
Branch / Tag:
refs/tags/0.4.2 - Owner: https://github.com/4383
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@72dec3a1247e9e0c0df6f5b3e14742a6704b5793 -
Trigger Event:
push
-
Statement type: