Skip to content

Commit

Permalink
Merge pull request #5305 from nanasess/fix-zap-readme
Browse files Browse the repository at this point in the history
[OWASP ZAP] 自動化の README 修正
  • Loading branch information
chihiro-adachi authored Mar 11, 2022
2 parents cfb8222 + 4f2024a commit 8ab6b60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zap/selenium/ci/TypeScript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ docker-compose up -d ec-cube
## yarn でテストを実行します。
cd zap/selenium/ci/TypeScript
yarn install && yarn playwright install # (初回のみ)
HTTP_PROXY=127.0.0.1:8090 HTTPS_PROXY=127.0.0.1:8090 yarn playwright test
yarn playwright test

## (Optional) 個別にテストする場合は、テストのファイル名を指定してください。
HTTP_PROXY=127.0.0.1:8090 HTTPS_PROXY=127.0.0.1:8090 yarn playwright test test/front_guest/contact.test.ts
yarn playwright test test/front_guest/contact.test.ts
```

#### 実行中に OWASP ZAP を操作したい場合
Expand All @@ -69,7 +69,7 @@ HTTP_PROXY=127.0.0.1:8090 HTTPS_PROXY=127.0.0.1:8090 yarn playwright test test/f
以下のように playwright に `--headed` オプションを付与することで Chrome が実際に起動し、実行状況を確認できます。

``` shell
HTTP_PROXY=127.0.0.1:8090 HTTPS_PROXY=127.0.0.1:8090 yarn playwright test test/front_guest/contact.test.ts --headed
yarn playwright test test/front_guest/contact.test.ts --headed
```

また、 [`page.pause()`](https://playwright.dev/docs/api/class-page#page-pause)をテストコードに埋め込めばステップ実行も可能です。
Expand All @@ -93,4 +93,5 @@ GitHub Actions のワークフローが完了すると、 OWASP ZAP のセッシ
## 参考

- EC-CUBE開発者向けドキュメントの [EC-CUBE Penetration Testing with OWASP ZAP](https://doc4.ec-cube.net/penetration-testing) も併わせてお読みください
- [脆弱性対応勉強会Expansion 第05回(OWASP ZAP&EC-CUBE)発表資料](https://zenn.dev/nanasess/articles/vulnstudy05-owasp-and-eccube)
- [Driving OWASP ZAP with Selenium](https://owasp.org/www-chapter-london/assets/slides/OWASPLondon-OWASP-ZAP-Selenium-20180830-PDF.pdf)

0 comments on commit 8ab6b60

Please sign in to comment.