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
Plugin Security
Brad Parbs
July 26, 2014
More Decks by Brad Parbs
See All by Brad Parbs
Learn to Love the Terminal
bradp
0
710
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
330
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
430
WordCamp Baltimore - Let's Get Sassy!
bradp
2
520
Starter Themes for Appleton WordPress Meetup
bradp
1
190
#WCGR - Getting SASSy
bradp
4
300
#WCPVD - Getting SASSy
bradp
2
290
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
180
Other Decks in Technology
See All in Technology
エムスリーテクノロジーズ株式会社 エンジニア向け紹介資料 / M3 Technologies Company Deck
m3_engineering
0
170
(きっとたぶん)人材育成や教育のような何かの話
sejima
0
750
AIエージェントの支払い基盤 AgentCore Payments概要
kmiya84377
2
200
AI対話分析の夢と、汚いデータの現実 Looker / Dataplex / Dataform で実現する品質ファーストな基盤設計
waiwai2111
0
590
How to learn AWS Well-Architected with AWS BuilderCards: Security Edition
coosuke
PRO
0
150
Purview 勉強会報告 Microsoft Purview 入門しようとしてみた
masakichixo
1
440
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
180
Gaussian Splattingの実用化 - 映像制作への展開
gpuunite_official
0
200
100マイクロサービスのTerraform/Kubernetes管理地獄から抜け出すためのAI活用術
markie1009
0
160
R&D 祭 2024 UE5で絵コンテ・作画の制作支援ツールをつくる話
olmdrd
PRO
0
170
毎日の作業を Claude Code 経由にしたら、 ノウハウがコードになった
kossykinto
1
1.4k
Sociotechnical Architecture Reviews: Understanding Teams, not just Artefacts
ewolff
1
180
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
550
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Technical Leadership for Architectural Decision Making
baasie
3
360
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
520
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
190
Git: the NoSQL Database
bkeepers
PRO
432
67k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.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