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
160
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Plugin Security
Brad Parbs
July 26, 2014
More Decks by Brad Parbs
See All by Brad Parbs
Learn to Love the Terminal
bradp
0
730
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
190
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
350
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
440
WordCamp Baltimore - Let's Get Sassy!
bradp
2
540
Starter Themes for Appleton WordPress Meetup
bradp
1
200
#WCGR - Getting SASSy
bradp
4
310
#WCPVD - Getting SASSy
bradp
2
310
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
190
Other Decks in Technology
See All in Technology
ここは地獄!つらい朝会を体験することで、チームとしてのより良い振る舞いに気づくワークショップ / The stand-up meeting from hell in the game industry
scrummasudar
0
220
AI時代におけるエンジニアの新たな役割──FDEとクオリアの探求/登壇資料(戸井田 裕貴)
hacobu
PRO
0
310
副作用のある Lambda でも Lambda Power Tuning は使えるのか / lambda-power-tuning-side-effects
koukihosaka
1
140
探索・可視化・自動化を一本化 Amazon Quickでデータ活用スピードを上げる方法
koheiyoshikawa
0
170
AI時代のYAGNI:「爆速で無駄になった機能」からの学び / 20260720 Naoki Takahashi
shift_evolve
PRO
3
520
AIツールを導入しても生産性はあがらない? カオナビが直面した 3つの壁と乗り越え方。/ Overcoming 3 Barriers to AI-Driven Productivity at kaonavi
kaonavi
0
160
Amazon Quick 入門!
ysuzuki
2
130
なぜ、あなたのAPIは使われないのか? AX時代の設計原則、ガードレール、運用体制
yokawasa
1
210
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
書籍セキュアAPIについて
riiimparm
0
210
PHPで作って学ぶリアルタイム音声対話AIとWebSocket入門 by ムナカタ
munakata
0
130
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
300
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
380
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
440
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
270
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
390
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
470
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Prompt Engineering for Job Search
mfonobong
0
380
Marketing to machines
jonoalderson
1
5.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
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