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
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
Search
hatsu
June 05, 2025
Programming
1
120
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu
June 05, 2025
Tweet
Share
More Decks by hatsu
See All by hatsu
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
210
introduction_scriptor_gem.pdf
hatsu38
1
130
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
17k
Just a Rails Patch Update
hatsu38
2
750
Dive into MaintenanceTasks
hatsu38
1
150
GitHub Actions is Fun
hatsu38
1
170
Other Decks in Programming
See All in Programming
効率的な開発手段として VRTを活用する
ishkawa
0
160
Model Pollution
hschwentner
1
160
CDK引数設計道場100本ノック
badmintoncryer
2
470
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
350
TypeScriptでDXを上げろ! Hono編
yusukebe
3
760
AWS Summit Japan 2024と2025の比較/はじめてのKiro、今あなたは岐路に立つ
satoshi256kbyte
0
110
Deep Dive into ~/.claude/projects
hiragram
14
13k
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.5k
SQLアンチパターン第2版 データベースプログラミングで陥りがちな失敗とその対策 / Intro to SQL Antipatterns 2nd
twada
PRO
9
370
ニーリーにおけるプロダクトエンジニア
nealle
0
950
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
240
20250708_JAWS_opscdk
takuyay0ne
2
130
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Adopting Sorbet at Scale
ufuk
77
9.5k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
750
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Become a Pro
speakerdeck
PRO
29
5.4k
Transcript
Prism.parseͰ 300ຊҎ্͋ΔΤϯυϙΠϯτʹ ଓͰ͖ΔݖݶͷҰཡදΛ࡞ͬͯΈͨ Omotesandorb #110 @hatsu_38 2025/06/05
ࣗݾհ • Rubyྺ 6 = ΤϯδχΞྺ • SHE Inc. •
React.js / TypeScript / GitHub Actions • Ruby͕Ұ൪͖
ٕज़ελοΫ • Backend: Ruby, Ruby on Rails, GraphQL, Sidekiq •
Frontend: React.js, TypeScript, Next.js • Database: MySQL 8.0 • CI: GitHub Actions • Infrastructure: Kubernetes
ཧը໘ͷ શͯͷΤϯυϙΠϯτʹ͍ͭͯ ͲͷݖݶͰୟ͚Δ͔ ग़ͯ͠΄͍͠
Γ͍ͨ͜ͱ - PermissionͱAPIͷҰཡΛ࡞Δ • ਖ਼نදݱͰΰχϣΰχϣͯ͠Ͱ͖ͦ͏͕ͩɺ"45ͰͬͯΈͨ
Γ͍ͨ͜ͱ - PermissionͱAPIͷҰཡΛ࡞Δ • ͜Μͳײ͡ͷ.BSLEPXOΛੜ͢Δ
Γ͍ͨ͜ͱ - PermissionͱAPIͷҰཡΛ࡞Δ • ͜Μͳײ͡ͷ.BSLEPXOΛੜ͢Δ 1. શ"1*ͷΫϥε໊Λऔಘ͢Δ 2. શ"1*ͷ1VCMJDͳΞΫγϣϯ໊Λऔಘ͢Δ 3.
શ"1*ͷCFGPSF@BDUJPOΛऔಘ͢Δ 4. શ෦Λ߹ମͤͯ͞ZNMΛ࡞Δ 5. yml͔ΒMarkdownΛ࡞Δ ͜͜ΛASTͰ࣮ݱ͢Δ
Prism.parseʹ͍ͭͯ - AST(நߏจ)ΛΈཱͯΔ
None
CallNodeΛൈਮ
IntegerNodeΛൈਮ
Node͍ͬͺ͍͋Δ https://docs.ruby-lang.org/en/3.4/table_of_contents.html#classes
Prism.parseͷ݁ՌΛ͍͡ΕControllerͷ Class໊ͷऔಘͰ͖Δ
NodeΛ؆୯ʹऔಘ͍ͨ͠ - Prism::Visitor visit_୳ࡧ͍ͨ͠Node໊_node
NodeΛ؆୯ʹऔಘ͍ͨ͠ - Prism::Visitor visit_୳ࡧ͍ͨ͠Node໊_node
Class໊Λ؆୯ʹऔಘ͍ͨ͠ - Controllerͷྫ visit_୳ࡧ͍ͨ͠Node໊_node
Class໊Λ؆୯ʹऔಘ͍ͨ͠ - ClassNodeऔಘ visit_୳ࡧ͍ͨ͠Node໊_node ClassNode ίϯτʔϥʔ໊औಘʂ
Class໊Λ؆୯ʹऔಘ͍ͨ͠ - Prism::Visitor visit_୳ࡧ͍ͨ͠Node໊_node
ࠓճͬͨ visit_**_node • visit_class_node -> Controllerͷ໊લऔಘ • visit_call_node -> before_actionͷऔಘprivateϝιου͔Ͳ͏͔ͷఆ
• visit_module_node -> ωετ͞Εͨ$POUSPMMFSͷ.PEVMF໊औಘ • visit_def_node -> Controllerʹఆٛ͞ΕͨAction໊औಘ • visit_keyword_hash_node -> before_actionͷonlyͷऔಘ
͓ΘΓʹ 1.ਖ਼نදݱͰ࣮ݱͰ͖͚ͨͲASTͰ৮ͬͯΈ·ͨ͠ 2.Prism.parseͨ͠ΒNodeखʹೖΔ͠ 3.Prism::VisitorΛ͑ཉ͍͠NodeखʹೖΔͷͰҙ֎ͱΞϦͳબࢶ