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:
2026-02-02 16:02:03 +09:00
parent 62a4d499ae
commit d407e95d1c

View File

@@ -24,33 +24,52 @@ Detects vulnerabilities through recursive taint analysis by tracking data flow a
#### Method 1: Docker (Recommended) #### Method 1: Docker (Recommended)
No PHP or Composer environment required. No PHP or Composer environment required. Just Docker.
**Step 1: Clone and build**
```bash ```bash
# Clone the repository
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git 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 ./install.sh
``` ```
After installation, use the `php-security-lint` command: After installation, use the `php-security-lint` command anywhere:
```bash ```bash
# Run in your project directory
cd /path/to/your/laravel-project cd /path/to/your/laravel-project
php-security-lint . php-security-lint .
php-security-lint app/ -s high php-security-lint app/ -s high
``` ```
#### Method 2: Direct Execution #### Method 2: Direct Execution (PHP Required)
Requires PHP 8.1+ and Composer. Requires PHP 8.1+ and Composer.
```bash ```bash
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git
cd php-laravel-security-linter cd php-security-linter
composer install composer install
php bin/security-lint /path/to/target php bin/security-lint /path/to/target
``` ```
@@ -332,33 +351,52 @@ PHP および Laravel アプリケーション向けの静的セキュリティ
#### 方法1: Docker推奨 #### 方法1: Docker推奨
PHPやComposerの環境構築なしで使用できます。 PHPやComposerの環境構築は不要です。Dockerのみで動作します。
**ステップ1: クローンとビルド**
```bash ```bash
# リポジトリをクローン
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git 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 ./install.sh
``` ```
インストール後は `php-security-lint` コマンドで使用できます: インストール後は `php-security-lint` コマンドでどこからでも使用できます:
```bash ```bash
# プロジェクトディレクトリで実行
cd /path/to/your/laravel-project cd /path/to/your/laravel-project
php-security-lint . php-security-lint .
php-security-lint app/ -s high php-security-lint app/ -s high
``` ```
#### 方法2: 直接実行 #### 方法2: 直接実行PHP必須
PHP 8.1以上とComposerが必要です。 PHP 8.1以上とComposerが必要です。
```bash ```bash
git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git git clone https://opensource.rogarithm.net/rogarithm/php-security-linter.git
cd php-laravel-security-linter cd php-security-linter
composer install composer install
php bin/security-lint /path/to/target php bin/security-lint /path/to/target
``` ```