DiosProc.nativecodeanalysis.sarif 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  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/DiosProc/DiosProc.cpp"
  17. },
  18. "region": {
  19. "startLine": 162,
  20. "startColumn": 25,
  21. "endLine": 162,
  22. "endColumn": 37
  23. }
  24. },
  25. "logicalLocations": [
  26. {
  27. "decoratedName": "?Exec@TestMqtt@@UEAA_NXZ",
  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/DiosProc/DiosProc.cpp"
  44. },
  45. "region": {
  46. "startLine": 205,
  47. "startColumn": 26,
  48. "endLine": 205,
  49. "endColumn": 40
  50. }
  51. },
  52. "logicalLocations": [
  53. {
  54. "decoratedName": "??R<lambda_db181f1e1ad0fa8f73d3a3d4895a4323>@@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/DiosProc/DiosProc.cpp"
  71. },
  72. "region": {
  73. "startLine": 208,
  74. "startColumn": 28,
  75. "endLine": 208,
  76. "endColumn": 41
  77. }
  78. },
  79. "logicalLocations": [
  80. {
  81. "decoratedName": "??R<lambda_db181f1e1ad0fa8f73d3a3d4895a4323>@@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_95413bebast -typedil -f DiosProc.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 -DWIN32 -DNDEBUG -D_CONSOLE -D_LIB -D_CRT_SECURE_NO_WARNINGS -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\\DiosProcCX64.pch -Fox64\\Release\\DiosProc.obj -Fdx64\\Release\\vc142.pdb -external:W 3 -Gd -analyze:projectdirectory E:\\DeviceV3.0\\DriverPlatform-V3.1\\DrvProc\\DiosProc -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:\\DeviceV3.0\\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/DiosProc/DiosProc.cpp"
  167. },
  168. "roles": [
  169. "analysisTarget",
  170. "resultFile"
  171. ],
  172. "hashes": {
  173. "md5": "bdfe4b359f1729551c54c392028a15f8"
  174. }
  175. },
  176. {
  177. "location": {
  178. "uri": "file:///E:/DeviceV3.0/Deliver/include/ResDataObject.h"
  179. },
  180. "roles": [
  181. "resultFile"
  182. ],
  183. "hashes": {
  184. "md5": "5952703846c703003535fa667ae9a289"
  185. }
  186. },
  187. {
  188. "location": {
  189. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/diosproc/stdafx.h"
  190. },
  191. "hashes": {
  192. "md5": "f62bb1a70bd436d7ed217fbb53e5d9d3"
  193. }
  194. },
  195. {
  196. "location": {
  197. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/diosproc/targetver.h"
  198. },
  199. "hashes": {
  200. "md5": "20a1397a4f718d91f76e2681bef085b6"
  201. }
  202. },
  203. {
  204. "location": {
  205. "uri": "file:///e:/devicev3.0/deliver/include/cdi.h"
  206. },
  207. "hashes": {
  208. "md5": "d5320564bd7cdc598d188b814ad14f37"
  209. }
  210. },
  211. {
  212. "location": {
  213. "uri": "file:///e:/devicev3.0/deliver/include/definitions.h"
  214. },
  215. "hashes": {
  216. "md5": "1b36a119d096288c057adf16222c01a8"
  217. }
  218. },
  219. {
  220. "location": {
  221. "uri": "file:///e:/devicev3.0/deliver/include/diosfilehandle.h"
  222. },
  223. "hashes": {
  224. "md5": "84c6a7455068dd69e1ec839c294b7761"
  225. }
  226. },
  227. {
  228. "location": {
  229. "uri": "file:///e:/devicev3.0/deliver/include/dioslock.h"
  230. },
  231. "hashes": {
  232. "md5": "6ef694600e306d1039fe501b0e4db656"
  233. }
  234. },
  235. {
  236. "location": {
  237. "uri": "file:///e:/devicev3.0/deliver/include/cdinterface.h"
  238. },
  239. "hashes": {
  240. "md5": "ddb93aea7999cd2b82e70d603a6a6323"
  241. }
  242. },
  243. {
  244. "location": {
  245. "uri": "file:///e:/devicev3.0/deliver/include/localconfig.h"
  246. },
  247. "hashes": {
  248. "md5": "c8a4c4350dde86a99fa272e9e9578995"
  249. }
  250. },
  251. {
  252. "location": {
  253. "uri": "file:///e:/devicev3.0/deliver/include/busunitclient.h"
  254. },
  255. "hashes": {
  256. "md5": "a9386b1556a001440b807462f754b382"
  257. }
  258. },
  259. {
  260. "location": {
  261. "uri": "file:///e:/devicev3.0/deliver/include/logicclient.h"
  262. },
  263. "hashes": {
  264. "md5": "e98812889a6f98dd39fe2c595863a87f"
  265. }
  266. },
  267. {
  268. "location": {
  269. "uri": "file:///e:/devicev3.0/deliver/include/msgqueue.h"
  270. },
  271. "hashes": {
  272. "md5": "73927cf318a5240ea737c7748703f3fc"
  273. }
  274. },
  275. {
  276. "location": {
  277. "uri": "file:///e:/devicev3.0/deliver/include/scopelock.h"
  278. },
  279. "hashes": {
  280. "md5": "fe1c154331759bc62a8157897df388f0"
  281. }
  282. },
  283. {
  284. "location": {
  285. "uri": "file:///e:/devicev3.0/deliver/include/logicdevice.h"
  286. },
  287. "hashes": {
  288. "md5": "8f36b6e7ec2db97cac2b562a94939c1c"
  289. }
  290. },
  291. {
  292. "location": {
  293. "uri": "file:///e:/devicev3.0/deliver/include/dpc.h"
  294. },
  295. "hashes": {
  296. "md5": "8ae61aba6b81f2201447216e9314b335"
  297. }
  298. },
  299. {
  300. "location": {
  301. "uri": "file:///e:/devicev3.0/deliver/include/diosthread.h"
  302. },
  303. "hashes": {
  304. "md5": "bcf85fc2a8499ba80fd45eee229dd64c"
  305. }
  306. },
  307. {
  308. "location": {
  309. "uri": "file:///e:/devicev3.0/deliver/include/busunitlogic.h"
  310. },
  311. "hashes": {
  312. "md5": "05557ad30effe5ad9cdf2621caa85d6f"
  313. }
  314. },
  315. {
  316. "location": {
  317. "uri": "file:///e:/devicev3.0/deliver/include/common_api.h"
  318. },
  319. "hashes": {
  320. "md5": "88b1032a5ae2600400bf90500d1e476e"
  321. }
  322. },
  323. {
  324. "location": {
  325. "uri": "file:///e:/devicev3.0/deliver/include/packetanalizer.h"
  326. },
  327. "hashes": {
  328. "md5": "870d4c0a9d1b3e9f3abc69d28ab21c5e"
  329. }
  330. },
  331. {
  332. "location": {
  333. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/drvproc/diosproc/consolethread.h"
  334. },
  335. "hashes": {
  336. "md5": "8d55d2c71923aead7fed47783d663f38"
  337. }
  338. },
  339. {
  340. "location": {
  341. "uri": "file:///e:/devicev3.0/deliver/include/autodmp.h"
  342. },
  343. "hashes": {
  344. "md5": "adf728c13446a4d31ff120da0473c83a"
  345. }
  346. },
  347. {
  348. "location": {
  349. "uri": "file:///e:/devicev3.0/deliver/include/sharememory_client.h"
  350. },
  351. "hashes": {
  352. "md5": "57e378a6d9167f73356b18ae10b69de3"
  353. }
  354. }
  355. ]
  356. }
  357. ]
  358. }