github / github/codeql

Get full string for exported JavaScript results

未關閉
#18,723 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 15 小時
30 天內合併 PR
141

描述

Consider the query below, which attempts to get the callee and the associated parameters. The returned string for the parameters is often truncated (sanitized) when the length is longer than 20 characters [as seen in the source code](https://github.com/github/codeql/blob/7361ad977a5dd5252d21f5fd23de47d75b763651/javascript/extractor/src/com/semmle/js/extractor/TextualExtractor.java#L121). For instance, if the expected full string is `bd0be325-86d9-4f16-95fa-b677f7455177`, it returns something like `bd0be ... 5177`, which is not helpful for my project.

While there's a good reason for this behavior, I would really like to be able to export the full string for a follow-up analysis.

```
import javascript

from CallExpr call, Expr parameters
where
parameters = call.getArgument(_)

select call.getCallee(), parameters.toString()
```

I have seen a similar issue ([results abbreviation #9890](https://github.com/github/codeql/issues/9890)), but the suggestions do not address my problem.

I would really appreciate any support I can get here. Thank you.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。