-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve README #47
Draft
n4o847
wants to merge
1
commit into
develop
Choose a base branch
from
feature/35-improve-readme
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Improve README #47
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,63 @@ | ||
# seccamp z3 redos | ||
# ReDoS脆弱性検出プログラム | ||
|
||
セキュリティ・キャンプ全国大会2020 オンライン | ||
## 本プロジェクトについて | ||
|
||
\[Z-Ⅲ\] ReDoSの検出プログラムの作成とOSSへの適用 | ||
本プロジェクトは「セキュリティ・キャンプ全国大会2020 オンライン」にて行われた、集中開発コースのZトラックのⅢにあたる「ReDoSの検出プログラムの作成とOSSへの適用」講義で、受講生が制作したプロジェクトです。 | ||
講義受講生を中心として、講師、チューターらも本プロジェクトに関与しています。 | ||
|
||
## Usage | ||
セキュリティ・キャンプについては[こちら](https://www.ipa.go.jp/jinzai/camp/) | ||
セキュリティ・キャンプ全国大会2020 オンラインについては[こちら](https://www.ipa.go.jp/jinzai/camp/2020/zenkoku2020_index.html) | ||
講義「ReDoSの検出プログラムの作成とOSSへの適用」については[こちら](https://www.ipa.go.jp/jinzai/camp/2020/zenkoku2020_program_list.html#list_s-z3) | ||
|
||
## ReDoSとは? | ||
|
||
ReDoS (Regular expression Denial of Service) とは、正規表現が原因で起こるDoS攻撃のことです。 | ||
|
||
例えば `/^(a|a)*$/` や `/^a*a*$/` のような正規表現には、マッチング処理に文字列の長さの指数時間や二乗時間かかる攻撃文字列が存在し、多大な負荷がかかってしまう可能性があります。 | ||
|
||
本プロジェクトでは、このような正規表現の脆弱性を検出するプログラムを実装し、JavaScriptの静的解析ツールであるESLintに組み込みます。そしてそれを実際のOSSのソースコードに適用して脆弱性を探し出し、見つけた脆弱性を報告することでOSSに貢献するのが目的です。 | ||
|
||
## 発表資料 | ||
|
||
<!-- ここに発表スライドのサムネイルとURL --> | ||
|
||
## 使い方 | ||
|
||
### ブラウザで確認する | ||
|
||
ブラウザで正規表現から作られるオートマトンを確認できます。 | ||
|
||
https://n4o847.github.io/seccamp-redos/ | ||
|
||
### ESLintプラグインとして使う | ||
|
||
このツールをESLintプラグインとして使えるようにしたものが公開されています。 | ||
|
||
https://github.com/Neccolini/seccampZ3-linter | ||
|
||
### ライブラリとして使う | ||
|
||
```bash | ||
$ npm install n4o847/seccamp-redos | ||
``` | ||
|
||
```javascript | ||
const redos = require('seccamp-redos'); | ||
|
||
const re = /(a|a)*/; | ||
console.log(redos.detectReDoS(re.source, re.flags)); | ||
// { status: 'Vulnerable', message: 'Detected EDA.' } | ||
``` | ||
npm start | ||
|
||
### ローカルで動かす | ||
|
||
```bash | ||
~/$ git clone https://github.com/n4o847/seccamp-redos.git | ||
~/$ cd seccamp-redos | ||
~/seccamp-redos$ npm install | ||
~/seccamp-redos$ npx ts-node src/test.ts | ||
``` | ||
|
||
## 動作に必要なもの | ||
|
||
- npm | ||
Comment on lines
+61
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これが末尾あるのは違和感があります。あまり重要でもないので削除するか、そうでなければ「使い方」の先頭に持っていった方がいいと思います |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
末尾に空白を入れて改行するようにしてるみたいですが、このようにしたいのであれば素直にリストを使った方が良いと思います。