Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Drupal ParanoiaでDrupalをより安全に
Search
snize
October 12, 2018
Technology
0
98
Drupal ParanoiaでDrupalをより安全に
Drupal Meetup 羽田 #14 でのスライド
https://drupal-meetup-haneda.connpass.com/event/99066/
snize
October 12, 2018
Tweet
Share
More Decks by snize
See All by snize
Talking with drupal - psyshでの対話型デバッグ
snize
0
42
Other Decks in Technology
See All in Technology
新規プロダクト開発、AIでどう変わった? #デザインエンジニアMeetup
bengo4com
0
420
Model Mondays S2E01: Advanced Reasoning
nitya
0
270
エンジニア採用から始まる技術広報と組織づくり/202506lt
nishiuma
8
1.6k
In Praise of "Normal" Engineers (LDX3)
charity
0
190
Kotlinで学ぶ 代数的データ型
ysknsid25
5
1k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
38k
AWS全冠したので振りかえってみる
tajimon
0
120
脅威をモデリングしてMCPのセキュリティ対策を考えよう
flatt_security
4
1.4k
ソフトウェア開発現代史: "LeanとDevOpsの科学"の「科学」とは何か? - DORA Report 10年の変遷を追って - #開発生産性_findy
takabow
1
360
Workflows から Agents へ ~ 生成 AI アプリの成長過程とアプローチ~
belongadmin
2
120
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
Classmethod AI Talks(CATs) #22 司会進行スライド(2025.06.12) / classmethod-ai-talks-aka-cats_moderator-slides_vol22_2025-06-12
shinyaa31
0
200
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
Side Projects
sachag
454
42k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
180
53k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Why Our Code Smells
bkeepers
PRO
337
57k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Transcript
あなたのDrupalのディレクトリ構成は安全ですか?
Drupal Paranoiaで Drupalをより安全に 金子 智嗣 kaneko@zerobase.jp の運営メンバ @snize Drupal Meetup
Tokyo
過去の脆弱性 2016年に というモジュールで 脆弱性 が発見された。 Coder SA-CONTRIB-2016-039
webからアクセス可能な場所にあるだけで脆弱性 となった。 The module does not need to be enabled
for this to be exploited. Its presence on the le system and being reachable from the web are su cient.
Demo 一般的DrupalプロジェクトのDocrootを確認 zip版 版(composer) drupal-project
他のWebフレームワークと比較 Symfony Quick Tour: The Architecture Directory Structure - Laravel
- The PHP Framework For Web Artisans CakePHP のフォルダー構成 - 3.6
Drupalと他のComposerなフレームワークとの違い
Drupal Paranoia 不要なファイルを削除し 必要なファイルへのみシンボリックリンクを生成する
なぜこのプラグインを使うか 楽しつつ、脆弱性を生まないようにするため。
Demo 準備します... 1. もとのDocrootを退避 2. composer.json の extra にコードを追加 3.
プラグインをインストール
もとのDocrootを退避 mv web app
composer.jsonを編集 "installer-paths": { "app/core": ["type:drupal-core"], "app/libraries/{$name}": ["type:drupal-library"], "app/modules/contrib/{$name}": ["type:drupal-module"], "app/profiles/contrib/{$name}":
["type:drupal-profile"], "app/themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$name}": ["type:drupal-drush"] }, "drupal-app-dir": "app", "drupal-web-dir": "web",
プラグインをインストール composer require drupal-composer/drupal- paranoia:~1
変化を見てみる 1. /app 2. /web
まとめ Drupal Paranoiaによって web(docroot) 以下が 必要最小限のファイルに置き換えられ 不用意なアクセスからDrupalを守ることができる。
おまけ Drupal Paranoiaは のプロジェクトのひとつ Core doesn't embrace Composer best practices
OOTB Figure out how to separate php code from assets in modules and in core so that code can be vendored, and assets under the docroot. Drupal Composer Proposal: Composer Support in Core initiative [#2958021] | Drupal.org
以上です、ありがとうございました ( ω ) コンタクト @tomotsugu_kaneko - kaneko@zerobase.jp 次回 2018/11/01
@snize drupal-japan.slack.com Drupal Meetup Tokyo - connpass