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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
snize
October 12, 2018
Technology
110
0
Share
Drupal ParanoiaでDrupalをより安全に
Drupal Meetup 羽田 #14 でのスライド
https://drupal-meetup-haneda.connpass.com/event/99066/
snize
October 12, 2018
More Decks by snize
See All by snize
Talking with drupal - psyshでの対話型デバッグ
snize
0
50
Other Decks in Technology
See All in Technology
Gaussian Splattingの表現力を拡張する — 高周波再構成とインタラクションへのアプローチ —
gpuunite_official
0
190
続 運用改善、不都合な真実 〜 物理制約のない運用改善はほとんど無価値 / 20260518-ssmjp-kaizen-no-value-without-physical-constraints
opelab
2
240
エンタープライズの厳格な制約を開発者に意識させない:クラウドネイティブ開発基盤設計/cloudnative-kaigi-golden-path
mhrtech
0
440
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
M&Aで増え続けるプロダクトに少数QAはどう立ち向かうか─GENDAが挑む、全員で取り組む品質標準化戦略 / GENDA Tech Talk #4
genda
0
120
分断された OT と IT を繋ぐ架け橋 -Kubernetes が切り拓く 産業用組み込み製品の現在地 -
yudaiono
1
120
【関西製造業祭り2026春】現場を変える技術はここまで来た〜世界最大の製造業見本市から持って帰ってきたもの〜
tanakaseiya
0
180
最新技術を"今は選ばない"という技術選定
leveragestech
PRO
0
120
O'Reilly Infrastructure & Ops Superstream: Platform Engineering for Developers, Architects & the Rest of Us
syntasso
0
230
freeeで運用しているAIQAについて
qatonchan
1
630
CARTA HOLDINGS エンジニア向け 採用ピッチ資料 / CARTA-GUIDE-for-Engineers
carta_engineering
0
47k
The Bag-of-Documents Model for Query Understanding and Retrieval
dtunkelang
0
150
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
Building Adaptive Systems
keathley
44
3k
Side Projects
sachag
455
43k
30 Presentation Tips
portentint
PRO
1
290
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
350
Music & Morning Musume
bryan
47
7.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
360
A better future with KSS
kneath
240
18k
The Spectacular Lies of Maps
axbom
PRO
1
750
Un-Boring Meetings
codingconduct
0
290
Transcript
あなたのDrupalのディレクトリ構成は安全ですか?
Drupal Paranoiaで Drupalをより安全に 金子 智嗣
[email protected]
の運営メンバ @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 -
[email protected]
次回 2018/11/01
@snize drupal-japan.slack.com Drupal Meetup Tokyo - connpass