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
100
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
560
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
140
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
260
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
340
WordCamp Baltimore - Let's Get Sassy!
bradp
2
340
Starter Themes for Appleton WordPress Meetup
bradp
1
110
#WCGR - Getting SASSy
bradp
4
240
#WCPVD - Getting SASSy
bradp
2
240
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
140
Other Decks in Technology
See All in Technology
CDKのコードレビューを楽にするパッケージcdk-mentorを作ってみた/cdk-mentor
tomoki10
0
200
Formal Development of Operating Systems in Rust
riru
1
420
テストを書かないためのテスト/ Tests for not writing tests
sinsoku
1
170
PaaSの歴史と、 アプリケーションプラットフォームのこれから
jacopen
7
1.4k
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
570
完全自律型AIエージェントとAgentic Workflow〜ワークフロー構築という現実解
pharma_x_tech
0
330
今から、 今だからこそ始める Terraform で Azure 管理 / Managing Azure with Terraform: The Perfect Time to Start
nnstt1
0
210
2024年活動報告会(人材育成推進WG・ビジネスサブWG) / 20250114-OIDF-J-EduWG-BizSWG
oidfj
0
180
EMConf JP の楽しみ方 / How to enjoy EMConf JP
pauli
2
150
2025年の挑戦 コーポレートエンジニアの技術広報/techpr5
nishiuma
0
140
機械学習を「社会実装」するということ 2025年版 / Social Implementation of Machine Learning 2025 Version
moepy_stats
4
900
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
630
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.5k
4 Signs Your Business is Dying
shpigford
182
22k
RailsConf 2023
tenderlove
29
970
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
Facilitating Awesome Meetings
lara
51
6.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Side Projects
sachag
452
42k
Building an army of robots
kneath
302
45k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
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