Improve Docker installation documentation
- Reorganize Installation section with Docker as primary method - Add step-by-step Docker build and run instructions - Show direct docker run commands without wrapper script - Make wrapper script optional - Fix directory name to php-security-linter - Update both English and Japanese sections Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
70
README.md
70
README.md
@@ -24,33 +24,52 @@ Detects vulnerabilities through recursive taint analysis by tracking data flow a
|
||||
|
||||
#### Method 1: Docker (Recommended)
|
||||
|
||||
No PHP or Composer environment required.
|
||||
No PHP or Composer environment required. Just Docker.
|
||||
|
||||
**Step 1: Clone and build**
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git
|
||||
cd php-laravel-security-linter
|
||||
cd php-security-linter
|
||||
docker build -t php-security-linter:latest .
|
||||
```
|
||||
|
||||
# Install (builds Docker image and installs command)
|
||||
**Step 2: Run**
|
||||
|
||||
```bash
|
||||
# Scan your project directory
|
||||
docker run --rm -v /path/to/your/project:/target:ro php-security-linter:latest /target
|
||||
|
||||
# Scan current directory
|
||||
docker run --rm -v $(pwd):/target:ro php-security-linter:latest /target
|
||||
|
||||
# With options (high severity only, JSON output)
|
||||
docker run --rm -v $(pwd):/target php-security-linter:latest /target -s high -f json -o /target/report.json
|
||||
```
|
||||
|
||||
**Optional: Install wrapper command**
|
||||
|
||||
For convenience, you can install a wrapper script:
|
||||
|
||||
```bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
After installation, use the `php-security-lint` command:
|
||||
After installation, use the `php-security-lint` command anywhere:
|
||||
|
||||
```bash
|
||||
# Run in your project directory
|
||||
cd /path/to/your/laravel-project
|
||||
php-security-lint .
|
||||
php-security-lint app/ -s high
|
||||
```
|
||||
|
||||
#### Method 2: Direct Execution
|
||||
#### Method 2: Direct Execution (PHP Required)
|
||||
|
||||
Requires PHP 8.1+ and Composer.
|
||||
|
||||
```bash
|
||||
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git
|
||||
cd php-laravel-security-linter
|
||||
cd php-security-linter
|
||||
composer install
|
||||
php bin/security-lint /path/to/target
|
||||
```
|
||||
@@ -332,33 +351,52 @@ PHP および Laravel アプリケーション向けの静的セキュリティ
|
||||
|
||||
#### 方法1: Docker(推奨)
|
||||
|
||||
PHPやComposerの環境構築なしで使用できます。
|
||||
PHPやComposerの環境構築は不要です。Dockerのみで動作します。
|
||||
|
||||
**ステップ1: クローンとビルド**
|
||||
|
||||
```bash
|
||||
# リポジトリをクローン
|
||||
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git
|
||||
cd php-laravel-security-linter
|
||||
cd php-security-linter
|
||||
docker build -t php-security-linter:latest .
|
||||
```
|
||||
|
||||
# インストール (Dockerイメージのビルドとコマンドのインストール)
|
||||
**ステップ2: 実行**
|
||||
|
||||
```bash
|
||||
# プロジェクトディレクトリをスキャン
|
||||
docker run --rm -v /path/to/your/project:/target:ro php-security-linter:latest /target
|
||||
|
||||
# カレントディレクトリをスキャン
|
||||
docker run --rm -v $(pwd):/target:ro php-security-linter:latest /target
|
||||
|
||||
# オプション付き(高重大度のみ、JSON出力)
|
||||
docker run --rm -v $(pwd):/target php-security-linter:latest /target -s high -f json -o /target/report.json
|
||||
```
|
||||
|
||||
**オプション: ラッパーコマンドのインストール**
|
||||
|
||||
便利なラッパースクリプトをインストールできます:
|
||||
|
||||
```bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
インストール後は `php-security-lint` コマンドで使用できます:
|
||||
インストール後は `php-security-lint` コマンドでどこからでも使用できます:
|
||||
|
||||
```bash
|
||||
# プロジェクトディレクトリで実行
|
||||
cd /path/to/your/laravel-project
|
||||
php-security-lint .
|
||||
php-security-lint app/ -s high
|
||||
```
|
||||
|
||||
#### 方法2: 直接実行
|
||||
#### 方法2: 直接実行(PHP必須)
|
||||
|
||||
PHP 8.1以上とComposerが必要です。
|
||||
|
||||
```bash
|
||||
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git
|
||||
cd php-laravel-security-linter
|
||||
cd php-security-linter
|
||||
composer install
|
||||
php bin/security-lint /path/to/target
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user