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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
57
Other Decks in Technology
See All in Technology
4人目のSREはAgent
tanimuyk
0
270
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
1
370
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
3
860
組織における AI-DLC 実践
askul
0
140
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
550
Multi-Agent並列開発を 安全に回すための技術 / Technology for Safely Multi-Agent Parallel Development
tooppoo
0
210
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
180
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
2
430
MySQL & MySQL HeatWave Report - June 2026
freshdaz
0
190
Amazon Redshift zero-ETL 統合を活用した軽量なマルチプロダクトデータ可視化基盤 / Lightweight Multi-Product Data Visualization with Amazon Redshift Zero-ETL
kaminashi
0
110
AIエージェントとPhysical AIが拓く製造業の変革(ハノーバーメッセリキャップ)
iotcomjpadmin
0
160
BPaaSで進むAIオペレーションの現在地 AI実装が効く領域とスケーラビリティの選定と実装
kentarofujii
0
210
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Believing is Seeing
oripsolob
1
150
Exploring anti-patterns in Rails
aemeredith
3
430
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
KATA
mclloyd
PRO
35
15k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
250
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Designing Powerful Visuals for Engaging Learning
tmiket
1
430
Designing for humans not robots
tammielis
254
26k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
330
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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