DiosChannel.nativecodeanalysis.sarif 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. {
  2. "version": "2.1.0",
  3. "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
  4. "runs": [
  5. {
  6. "results": [
  7. {
  8. "ruleId": "C28159",
  9. "message": {
  10. "text": "考虑使用“GetTickCount64”而不是“GetTickCount”。原因: GetTickCount overflows roughly every 49 days. Code that does not take that into account can loop indefinitely. GetTickCount64 operates on 64 bit values and does not have that problem"
  11. },
  12. "locations": [
  13. {
  14. "physicalLocation": {
  15. "artifactLocation": {
  16. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DrvProc/DiosChannel/DiosChannel.cpp"
  17. },
  18. "region": {
  19. "startLine": 522,
  20. "startColumn": 21,
  21. "endLine": 522,
  22. "endColumn": 33
  23. }
  24. },
  25. "logicalLocations": [
  26. {
  27. "decoratedName": "??R<lambda_78e4e33dcad0d3b82a4fe6205ec155f4>@@QEBA@PEAVResDataObject@@PEBDPEAX@Z",
  28. "kind": "function"
  29. }
  30. ]
  31. }
  32. ]
  33. },
  34. {
  35. "ruleId": "C26812",
  36. "message": {
  37. "text": "枚举类型“_Packet_Type”未设定范围。相比于 \"enum\",首选 \"enum class\" (Enum.3)。"
  38. },
  39. "locations": [
  40. {
  41. "physicalLocation": {
  42. "artifactLocation": {
  43. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DrvProc/DiosChannel/DiosChannel.cpp"
  44. },
  45. "region": {
  46. "startLine": 550,
  47. "startColumn": 26,
  48. "endLine": 550,
  49. "endColumn": 40
  50. }
  51. },
  52. "logicalLocations": [
  53. {
  54. "decoratedName": "??R<lambda_78e4e33dcad0d3b82a4fe6205ec155f4>@@QEBA@PEAVResDataObject@@PEBDPEAX@Z",
  55. "kind": "function"
  56. }
  57. ]
  58. }
  59. ]
  60. },
  61. {
  62. "ruleId": "C26812",
  63. "message": {
  64. "text": "枚举类型“_Packet_Cmd”未设定范围。相比于 \"enum\",首选 \"enum class\" (Enum.3)。"
  65. },
  66. "locations": [
  67. {
  68. "physicalLocation": {
  69. "artifactLocation": {
  70. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DrvProc/DiosChannel/DiosChannel.cpp"
  71. },
  72. "region": {
  73. "startLine": 553,
  74. "startColumn": 28,
  75. "endLine": 553,
  76. "endColumn": 41
  77. }
  78. },
  79. "logicalLocations": [
  80. {
  81. "decoratedName": "??R<lambda_78e4e33dcad0d3b82a4fe6205ec155f4>@@QEBA@PEAVResDataObject@@PEBDPEAX@Z",
  82. "kind": "function"
  83. }
  84. ]
  85. }
  86. ]
  87. },
  88. {
  89. "ruleId": "C26495",
  90. "message": {
  91. "text": "未初始化变量 BaseJsonDataObject<unsigned __int64>::m_Data。始终初始化成员变量(type.6)。"
  92. },
  93. "locations": [
  94. {
  95. "physicalLocation": {
  96. "artifactLocation": {
  97. "uri": "file:///E:/DeviceV3.0/deliver/include/ResDataObject.h"
  98. },
  99. "region": {
  100. "startLine": 400,
  101. "startColumn": 2,
  102. "endLine": 400,
  103. "endColumn": 2
  104. }
  105. },
  106. "logicalLocations": [
  107. {
  108. "decoratedName": "??0?$BaseJsonDataObject@_K@@QEAA@XZ",
  109. "kind": "function"
  110. }
  111. ]
  112. }
  113. ],
  114. "properties": {
  115. "targetSymbol": "BaseJsonDataObject<unsigned __int64>::m_Data"
  116. }
  117. },
  118. {
  119. "ruleId": "C26495",
  120. "message": {
  121. "text": "未初始化变量 BaseJsonDataObject<bool>::m_Data。始终初始化成员变量(type.6)。"
  122. },
  123. "locations": [
  124. {
  125. "physicalLocation": {
  126. "artifactLocation": {
  127. "uri": "file:///E:/DeviceV3.0/deliver/include/ResDataObject.h"
  128. },
  129. "region": {
  130. "startLine": 400,
  131. "startColumn": 2,
  132. "endLine": 400,
  133. "endColumn": 2
  134. }
  135. },
  136. "logicalLocations": [
  137. {
  138. "decoratedName": "??0?$BaseJsonDataObject@_N@@QEAA@XZ",
  139. "kind": "function"
  140. }
  141. ]
  142. }
  143. ],
  144. "properties": {
  145. "targetSymbol": "BaseJsonDataObject<bool>::m_Data"
  146. }
  147. }
  148. ],
  149. "tool": {
  150. "driver": {
  151. "name": "PREfast",
  152. "fullName": "PREfast Code Analysis",
  153. "version": "14.29.30133.0",
  154. "informationUri": "https://aka.ms/cpp/ca"
  155. }
  156. },
  157. "invocations": [
  158. {
  159. "commandLine": "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\c1xx.dll\" -ACf{1F7B090C-16DB-4822-966A-A93D26ED4681} -ACpmspft140.dll -Alint -D_PREFAST_ -D_AST_FE_ -Analyze -zm0x0064C1B0 -allChunksReserved -il C:\\Users\\ecom\\AppData\\Local\\Temp\\_CL_1a7603e0ast -typedil -f DiosChannel.cpp -Ze -D_MSC_EXTENSIONS -Zp16 -pc \\:/ -D_MSC_VER=1929 -D_MSC_FULL_VER=192930133 -D_MSC_BUILD=0 -D_M_AMD64=100 -ZILP448 -D_M_X64=100 -D_WIN64 -D_WIN32 -GR -D_CPPRTTI -I G:\\vcpkg\\installed\\x64-windows\\include -nologo -W 3 -diagnostics:column -D_GUARDOVERFLOW_CRT_ALLOCATORS=1 -Ot -Oi -ltcg -DCODE_ANALYSIS -D_CRT_SECURE_NO_WARNINGS -DWIN32 -DNDEBUG -D_CONSOLE -D_LIB -D_MBCS -EHs -D_CPPUNWIND -EHc -MD -D_MT -D_DLL -GS -D_M_FP_PRECISE -Zc:wchar_t -Zc:forScope -Yustdafx.h -Fpx64\\Release\\DiosChannelX64.pch -Fox64\\Release\\DiosChannel.obj -Fdx64\\Release\\vc142.pdb -external:W 3 -Gd -analyze:projectdirectory E:\\DeviceV3.0\\DriverPlatform-V3.1\\DrvProc\\DiosChannel -analyze:rulesetdirectory ;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\\\Rule Sets; -analyze:ruleset C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\Rule Sets\\NativeRecommendedRules.ruleset -analyze:quiet -analyze:plugin C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\EspXEngine.dll -FC -errorreport:prompt -I E:\\DeviceV3.0\\deliver\\include -I E:\\deliver\\include\\Common -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\ucrt -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\um -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\winrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\cppwinrt -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -I G:\\vcpkg\\installed\\x64-windows\\include -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\ucrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\ucrt -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\um -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\um -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\winrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\winrt -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\cppwinrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\cppwinrt -external:I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -external:I G:\\vcpkg\\installed\\x64-windows\\include -I G:\\vcpkg\\installed\\x64-windows\\include",
  160. "executionSuccessful": true
  161. }
  162. ],
  163. "artifacts": [
  164. {
  165. "location": {
  166. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/dioschannel/vga_demo.cpp"
  167. },
  168. "roles": [
  169. "analysisTarget"
  170. ],
  171. "hashes": {
  172. "md5": "2418397e1188185c08addb911a296613"
  173. }
  174. },
  175. {
  176. "location": {
  177. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/dioschannel/stdafx.h"
  178. },
  179. "hashes": {
  180. "md5": "f62bb1a70bd436d7ed217fbb53e5d9d3"
  181. }
  182. },
  183. {
  184. "location": {
  185. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/dioschannel/targetver.h"
  186. },
  187. "hashes": {
  188. "md5": "20a1397a4f718d91f76e2681bef085b6"
  189. }
  190. },
  191. {
  192. "location": {
  193. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/dioschannel/vga_demo.h"
  194. },
  195. "hashes": {
  196. "md5": "4a901caa8919ce27a3f5f265dcae80d5"
  197. }
  198. },
  199. {
  200. "location": {
  201. "uri": "file:///e:/devicev3.0/deliver/include/diosthread.h"
  202. },
  203. "hashes": {
  204. "md5": "bcf85fc2a8499ba80fd45eee229dd64c"
  205. }
  206. },
  207. {
  208. "location": {
  209. "uri": "file:///e:/devicev3.0/deliver/include/dioslock.h"
  210. },
  211. "hashes": {
  212. "md5": "6ef694600e306d1039fe501b0e4db656"
  213. }
  214. },
  215. {
  216. "location": {
  217. "uri": "file:///e:/devicev3.0/deliver/include/resdataobject.h"
  218. },
  219. "roles": [
  220. "resultFile"
  221. ],
  222. "hashes": {
  223. "md5": "5952703846c703003535fa667ae9a289"
  224. }
  225. },
  226. {
  227. "location": {
  228. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DrvProc/DiosChannel/DiosChannel.cpp"
  229. },
  230. "roles": [
  231. "analysisTarget",
  232. "resultFile"
  233. ],
  234. "hashes": {
  235. "md5": "d65dd5786b7fab138a6334adb0a420ae"
  236. }
  237. },
  238. {
  239. "location": {
  240. "uri": "file:///e:/devicev3.0/deliver/include/cdi.h"
  241. },
  242. "hashes": {
  243. "md5": "d5320564bd7cdc598d188b814ad14f37"
  244. }
  245. },
  246. {
  247. "location": {
  248. "uri": "file:///e:/devicev3.0/deliver/include/definitions.h"
  249. },
  250. "hashes": {
  251. "md5": "1b36a119d096288c057adf16222c01a8"
  252. }
  253. },
  254. {
  255. "location": {
  256. "uri": "file:///e:/devicev3.0/deliver/include/diosfilehandle.h"
  257. },
  258. "hashes": {
  259. "md5": "84c6a7455068dd69e1ec839c294b7761"
  260. }
  261. },
  262. {
  263. "location": {
  264. "uri": "file:///e:/devicev3.0/deliver/include/cdinterface.h"
  265. },
  266. "hashes": {
  267. "md5": "ddb93aea7999cd2b82e70d603a6a6323"
  268. }
  269. },
  270. {
  271. "location": {
  272. "uri": "file:///e:/devicev3.0/deliver/include/busunitclient.h"
  273. },
  274. "hashes": {
  275. "md5": "a9386b1556a001440b807462f754b382"
  276. }
  277. },
  278. {
  279. "location": {
  280. "uri": "file:///e:/devicev3.0/deliver/include/logicclient.h"
  281. },
  282. "hashes": {
  283. "md5": "e98812889a6f98dd39fe2c595863a87f"
  284. }
  285. },
  286. {
  287. "location": {
  288. "uri": "file:///e:/devicev3.0/deliver/include/msgqueue.h"
  289. },
  290. "hashes": {
  291. "md5": "73927cf318a5240ea737c7748703f3fc"
  292. }
  293. },
  294. {
  295. "location": {
  296. "uri": "file:///e:/devicev3.0/deliver/include/scopelock.h"
  297. },
  298. "hashes": {
  299. "md5": "fe1c154331759bc62a8157897df388f0"
  300. }
  301. },
  302. {
  303. "location": {
  304. "uri": "file:///e:/devicev3.0/deliver/include/logicdevice.h"
  305. },
  306. "hashes": {
  307. "md5": "8f36b6e7ec2db97cac2b562a94939c1c"
  308. }
  309. },
  310. {
  311. "location": {
  312. "uri": "file:///e:/devicev3.0/deliver/include/dpc.h"
  313. },
  314. "hashes": {
  315. "md5": "8ae61aba6b81f2201447216e9314b335"
  316. }
  317. },
  318. {
  319. "location": {
  320. "uri": "file:///e:/devicev3.0/deliver/include/busunitlogic.h"
  321. },
  322. "hashes": {
  323. "md5": "05557ad30effe5ad9cdf2621caa85d6f"
  324. }
  325. },
  326. {
  327. "location": {
  328. "uri": "file:///e:/devicev3.0/deliver/include/localconfig.h"
  329. },
  330. "hashes": {
  331. "md5": "c8a4c4350dde86a99fa272e9e9578995"
  332. }
  333. },
  334. {
  335. "location": {
  336. "uri": "file:///e:/devicev3.0/deliver/include/packetanalizer.h"
  337. },
  338. "hashes": {
  339. "md5": "870d4c0a9d1b3e9f3abc69d28ab21c5e"
  340. }
  341. },
  342. {
  343. "location": {
  344. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/dioschannel/consolethread.h"
  345. },
  346. "hashes": {
  347. "md5": "390392a31264c313e6a38f9122f7fb0d"
  348. }
  349. },
  350. {
  351. "location": {
  352. "uri": "file:///e:/devicev3.0/deliver/include/autodmp.h"
  353. },
  354. "hashes": {
  355. "md5": "adf728c13446a4d31ff120da0473c83a"
  356. }
  357. },
  358. {
  359. "location": {
  360. "uri": "file:///e:/devicev3.0/deliver/include/common_api.h"
  361. },
  362. "hashes": {
  363. "md5": "88b1032a5ae2600400bf90500d1e476e"
  364. }
  365. }
  366. ]
  367. }
  368. ]
  369. }