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
Plugin Security
Search
Brad Parbs
July 26, 2014
Technology
3
150
Plugin Security
Brad Parbs
July 26, 2014
Tweet
Share
More Decks by Brad Parbs
See All by Brad Parbs
Learn to Love the Terminal
bradp
0
700
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
180
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
320
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
410
WordCamp Baltimore - Let's Get Sassy!
bradp
2
510
Starter Themes for Appleton WordPress Meetup
bradp
1
190
#WCGR - Getting SASSy
bradp
4
290
#WCPVD - Getting SASSy
bradp
2
290
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
170
Other Decks in Technology
See All in Technology
猫でもわかるKiro CLI(AI 駆動開発への道編)
kentapapa
0
270
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
1
260
2026-03-11 JAWS-UG 茨城 #12 改めてALBを便利に使う
masasuzu
2
410
WebアクセシビリティをCI/CDで担保する ― axe DevTools × Playwright C#実践ガイド
tomokusaba
2
190
「お金で解決」が全てではない!大規模WebアプリのCI高速化 #phperkaigi
stefafafan
4
1.7k
OCI技術資料 : コンピュート・サービス 概要
ocise
4
54k
OSC仙台プレ勉強会 AlmaLinuxとは
koedoyoshida
0
190
形式手法特論:SMT ソルバで解く認可ポリシの静的解析 #kernelvm / Kernel VM Study Tsukuba No3
ytaka23
1
650
Keycloak を使った SSO で CockroachDB にログインする / CockroachDB SSO with Keycloak
kota2and3kan
0
170
生成AIで速度と品質を両立する、QAエンジニア・開発者連携のAI協調型テストプロセス
shota_kusaba
0
240
TypeScript 7.0の現在地と備え方
uhyo
7
1.9k
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
280
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
150
Fireside Chat
paigeccino
42
3.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Rails Girls Zürich Keynote
gr2m
96
14k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
490
Thoughts on Productivity
jonyablonski
75
5.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Transcript
Security for Your Plugins
I’m Brad Parbs.
Nathan, you should watch Band of Brothers.
Let’s talk about what sucks in WordPress.
None
None
“20% of the 50 most popular WordPress plugins are vulnerable
to common Web attacks. This amounts to nearly 8 million downloads of vulnerable plugins.” Checkmarx, an application security company
Things that happen when your stuff isn’t secure.
None
How do we make sure this doesn’t happen?
Always develop with debugging ON
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true ); define( 'WP_CACHE', false );
Sanitize all the things
intval(); absint();
wp_kses();
sanitize_title();
sanitize_email() sanitize_file_name() sanitize_html_class() sanitize_key() sanitize_meta()
sanitize_mime_type() sanitize_option() sanitize_sql_orderby() sanitize_post_field() sanitize_text_field() sanitize_title() sanitize_title_for_query() sanitize_title_with_dashes() sanitize_user()
Escape all the things
esc_html();
esc_textarea();
esc_attr();
esc_url();
http://codex.wordpress.org/Data_Validation
Database Queries
$wpdb-‐>insert();
$wpdb-‐>update();
$wpdb-‐>prepare();
Nonces
wp_nonce_url();
wp_nonce_field();
wp_create_nonce();
check_admin_referer();
wp_verify_nonce();
Remote Data
CURL is bad.
For real, CURL is bad.
wp_remote_get();
wp_remote_post();
wp_remote_request();
Check capabilities & roles
current_user_can();
Use native functions
A story about TimThumb
Questions?
None