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
150
3
Share
Plugin Security
Brad Parbs
July 26, 2014
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
330
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
180
Other Decks in Technology
See All in Technology
AWSで2番目にリリースされたサービスについてお話しします(諸説あります)
yama3133
0
120
I ran an automated simulation of fake news spread using OpenClaw.
zzzzico
1
930
ハーネスエンジニアリング×AI適応開発
aictokamiya
3
1.5k
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
150
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
Datadog で実現するセキュリティ対策 ~オブザーバビリティとセキュリティを 一緒にやると何がいいのか~
a2ush
0
190
ADOTで始めるサーバレスアーキテクチャのオブザーバビリティ
alchemy1115
2
160
AI前提とはどういうことか
daisuketakeda
0
110
Data Enabling Team立ち上げました
sansantech
PRO
0
280
Data Intelligence Engineering Unit 部門と各ポジション紹介
sansantech
PRO
0
120
AI時代に新卒採用、はじめました/junior-engineer-never-die
dmnlk
0
130
すごいぞManaged Kubernetes
harukasakihara
1
330
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
210
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
Mind Mapping
helmedeiros
PRO
1
140
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
480
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Abbi's Birthday
coloredviolet
2
6.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
990
Producing Creativity
orderedlist
PRO
348
40k
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