mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
docs: add CONTRIBUTORS and MAINTAINERS files, update README (#18)
* docs: README update * docs: introduce CONTRIBUTING.md * docs: introduce MAINTAINERS.txt
This commit is contained in:
@@ -0,0 +1,78 @@
|
|||||||
|
|
||||||
|
# Contributing Guide
|
||||||
|
|
||||||
|
You can contribute to `pmg` and help make it better. Apart from bug fixes,
|
||||||
|
features, we particularly value contributions in the form of:
|
||||||
|
|
||||||
|
- Documentation improvements
|
||||||
|
- Bug reports
|
||||||
|
- Using `pmg` in your projects and providing feedback
|
||||||
|
|
||||||
|
## How to contribute
|
||||||
|
|
||||||
|
1. Fork the repository
|
||||||
|
2. Add your changes
|
||||||
|
3. Submit a pull request
|
||||||
|
|
||||||
|
## How to report a bug
|
||||||
|
|
||||||
|
Create a new issue and add the label "bug".
|
||||||
|
|
||||||
|
## How to suggest a new feature
|
||||||
|
|
||||||
|
Create a new issue and add the label "enhancement".
|
||||||
|
|
||||||
|
## Development workflow
|
||||||
|
|
||||||
|
When contributing changes to repository, follow these steps:
|
||||||
|
|
||||||
|
1. Ensure tests are passing
|
||||||
|
2. Ensure you write test cases for new code
|
||||||
|
3. `Signed-off-by` line is required in commit message (use `-s` flag while committing)
|
||||||
|
|
||||||
|
## Developer Setup
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
- Go 1.24+
|
||||||
|
- Git
|
||||||
|
- Make
|
||||||
|
|
||||||
|
### Getting Started
|
||||||
|
|
||||||
|
1. Clone your fork:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/YOUR_USERNAME/pmg.git
|
||||||
|
cd pmg
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Install dependencies:
|
||||||
|
```bash
|
||||||
|
go mod tidy
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Build the project:
|
||||||
|
```bash
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
|
### Development Workflow
|
||||||
|
|
||||||
|
1. Create a branch:
|
||||||
|
```bash
|
||||||
|
git checkout -b feature/your-feature
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Make your changes and test:
|
||||||
|
```bash
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Commit with sign-off:
|
||||||
|
```bash
|
||||||
|
git commit -s -m "feat: add new feature"
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Push and create PR:
|
||||||
|
```bash
|
||||||
|
git push origin feature/your-feature
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
pmg is built and maintained by SafeDep with the help of the community.
|
||||||
|
https://safedep.io
|
||||||
|
|
||||||
|
Abhisek Datta
|
||||||
|
Email: abhisek@safedep.io
|
||||||
|
GitHub username: @abhisek
|
||||||
|
Affiliation: SafeDep
|
||||||
|
|
||||||
|
Sahil Bansal
|
||||||
|
Email: sahil.bansal@safedep.io
|
||||||
|
Github username: @Sahilb315
|
||||||
|
Affiliation: SafeDep
|
||||||
|
|
||||||
|
Omkar Phansopkar
|
||||||
|
Email: omkar.phansopkar@safedep.io
|
||||||
|
GitHub username: @OmkarPh
|
||||||
|
Affiliation: SafeDep
|
||||||
@@ -14,3 +14,6 @@ create_bin:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BIN_DIR)
|
rm -rf $(BIN_DIR)
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test ./...
|
||||||
|
|||||||
@@ -5,13 +5,22 @@ PMG is a security-focused wrapper for package managers that helps detect and pre
|
|||||||
|
|
||||||
|
|
||||||
## 📑 Table of Contents
|
## 📑 Table of Contents
|
||||||
|
- [Features](#features)
|
||||||
- [Supported Ecosystems](#supported-ecosystems)
|
- [Supported Ecosystems](#supported-ecosystems)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Prerequisites](#prerequisites)
|
- [Prerequisites](#prerequisites)
|
||||||
- [Environment Variables](#environment-variables)
|
- [Configuration](#configuration)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
|
- [NPM Packages](#npm-packages)
|
||||||
|
- [PNPM Packages](#pnpm-packages)
|
||||||
|
- [Common Flags](#common-flags)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- 🚫 Malware detection and prevention
|
||||||
|
- 🌲 Deep dependency analysis
|
||||||
|
- ⚡ Fast and efficient package verification
|
||||||
|
- 🔄 Seamless integration with existing package managers
|
||||||
|
|
||||||
## Supported Ecosystems
|
## Supported Ecosystems
|
||||||
Currently, PMG supports the following package ecosystems:
|
Currently, PMG supports the following package ecosystems:
|
||||||
@@ -19,6 +28,7 @@ Currently, PMG supports the following package ecosystems:
|
|||||||
| Ecosystem | Status | Command |
|
| Ecosystem | Status | Command |
|
||||||
|-----------|--------|---------|
|
|-----------|--------|---------|
|
||||||
| NPM | ✅ Active | `pmg npm install <package>` |
|
| NPM | ✅ Active | `pmg npm install <package>` |
|
||||||
|
| PNPM | ✅ Active | `pmg pnpm add <package>` |
|
||||||
| PyPI | 🚧 Planned | Coming soon |
|
| PyPI | 🚧 Planned | Coming soon |
|
||||||
| Go | 🚧 Planned | Coming soon |
|
| Go | 🚧 Planned | Coming soon |
|
||||||
|
|
||||||
@@ -35,29 +45,51 @@ go install github.com/safedep/pmg@latest
|
|||||||
- Go 1.24
|
- Go 1.24
|
||||||
- SafeDep API credentials (SAFEDEP_API_KEY and SAFEDEP_TENANT_ID)
|
- SafeDep API credentials (SAFEDEP_API_KEY and SAFEDEP_TENANT_ID)
|
||||||
|
|
||||||
## Environment Variables
|
## Configuration
|
||||||
|
|
||||||
- `SAFEDEP_API_KEY`: Your SafeDep API key
|
### Environment Variables
|
||||||
- `SAFEDEP_TENANT_ID`: Your SafeDep tenant ID
|
|
||||||
|
|
||||||
Visit https://docs.safedep.io/cloud/quickstart for instructions on obtaining your API Key and Tenant ID.
|
| Variable | Description | Required |
|
||||||
|
|----------|-------------|----------|
|
||||||
|
| `SAFEDEP_API_KEY` | Your SafeDep API key | Yes |
|
||||||
|
| `SAFEDEP_TENANT_ID` | Your SafeDep tenant ID | Yes |
|
||||||
|
|
||||||
|
Get your API credentials by visiting [SafeDep Quickstart Guide](https://docs.safedep.io/cloud/quickstart).
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Scanning NPM packages
|
### Security in Action
|
||||||
|
|
||||||
|
#### Malicious Package Detection
|
||||||
|

|
||||||
|
|
||||||
|
#### Bulk Package Analysis
|
||||||
|

|
||||||
|
|
||||||
|
### NPM Packages
|
||||||
|
Install a package:
|
||||||
```bash
|
```bash
|
||||||
pmg npm install <package-name>
|
pmg npm install <package-name>
|
||||||
```
|
```
|
||||||
|
|
||||||
OR
|
Alternative commands:
|
||||||
```bash
|
```bash
|
||||||
pmg npm i <package-name>
|
pmg npm i <package-name> # Short form
|
||||||
|
pmg npm add <package-name> # Alternative syntax
|
||||||
```
|
```
|
||||||
OR
|
|
||||||
|
### PNPM Packages
|
||||||
|
Install a package:
|
||||||
```bash
|
```bash
|
||||||
pmg npm add <package-name>
|
pmg pnpm add <package-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Common Flags
|
||||||
|
All standard package manager flags are supported:
|
||||||
|
```bash
|
||||||
|
pmg npm install --save-dev <package-name> # Install as dev dependency
|
||||||
|
pmg pnpm add -D <package-name> # Install as dev dependency
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
Refer to [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||||
Please feel free to submit a Pull Request.
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 293 KiB |
@@ -200,7 +200,7 @@ func TestRemoveMarkdown(t *testing.T) {
|
|||||||
{"Just plain text", "Just plain text"},
|
{"Just plain text", "Just plain text"},
|
||||||
|
|
||||||
// Complex mixed
|
// Complex mixed
|
||||||
{"### Title\nSome **bold** text and a [link](http://url.com).", "Title\nSome bold text and a link."},
|
{"### Title\nSome **bold** text and a [link](http://url.com).", "Title Some bold text and a link."},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|||||||
Reference in New Issue
Block a user