[Rust] Proc macro expansion support
- 主要言語
- CodeQL
- スター
- 10.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 141
説明
Hello, is there any way or are you planning to implement analysis on expanded proc macros? Im currently trying codeQL on [Anchor](https://crates.io/crates/anchor-lang), which makes heavy use of proc macros.
When running a simple test, I see that by default, codeQL doesn't fully resolve references that exist in the expanded code, meaning i only get a reference to the macro that generated the referenced code, but I dont know which part of the macro is to blame (i used `cargo expand`) to test that. It seems though that placing the expanded file in the root dir does indeed make it be analyzed, but I dont know if this fully supported at the moment.
Is there a better way to do this?
コントリビューションガイド
調査の方向性
issue に記載されている単純な Anchor テストから始め、cargo expand を使用して、元の proc-macro ソースとリポジトリルートに配置した展開後のファイルを比較します。それぞれの場合に CodeQL が参照をどのように解決するかを確認します。展開された proc macro がサポートされているかどうかを明らかにし、信頼できる解析アプローチまたは必要な実装範囲を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- security
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100