MultiDPC.nativecodeanalysis.sarif 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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": "C26812",
  9. "message": {
  10. "text": "枚举类型“_DPCDriverType”未设定范围。相比于 \"enum\",首选 \"enum class\" (Enum.3)。"
  11. },
  12. "locations": [
  13. {
  14. "physicalLocation": {
  15. "artifactLocation": {
  16. "uri": "file:///E:/DIOS_V2/DriverPlatform/MultiDPC/MultiDPC.cpp"
  17. },
  18. "region": {
  19. "startLine": 32,
  20. "startColumn": 2,
  21. "endLine": 32,
  22. "endColumn": 9
  23. }
  24. },
  25. "logicalLocations": [
  26. {
  27. "decoratedName": "?GetDPCType@MultiDPC@@UEAA?AW4_DPCDriverType@@XZ",
  28. "kind": "function"
  29. }
  30. ]
  31. }
  32. ]
  33. },
  34. {
  35. "ruleId": "C26812",
  36. "message": {
  37. "text": "枚举类型“_Ret_Status”未设定范围。相比于 \"enum\",首选 \"enum class\" (Enum.3)。"
  38. },
  39. "locations": [
  40. {
  41. "physicalLocation": {
  42. "artifactLocation": {
  43. "uri": "file:///E:/DIOS_V2/DriverPlatform/MultiDPC/MultiDPC.cpp"
  44. },
  45. "region": {
  46. "startLine": 51,
  47. "startColumn": 13,
  48. "endLine": 51,
  49. "endColumn": 49
  50. }
  51. },
  52. "logicalLocations": [
  53. {
  54. "decoratedName": "?GetDeviceResource@MultiDPC@@UEAA?AW4_Ret_Status@@PEAVResDataObject@@@Z",
  55. "kind": "function"
  56. }
  57. ]
  58. }
  59. ]
  60. },
  61. {
  62. "ruleId": "C28159",
  63. "message": {
  64. "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"
  65. },
  66. "locations": [
  67. {
  68. "physicalLocation": {
  69. "artifactLocation": {
  70. "uri": "file:///E:/DIOS_V2/DriverPlatform/MultiDPC/MultiDPC.cpp"
  71. },
  72. "region": {
  73. "startLine": 146,
  74. "startColumn": 24,
  75. "endLine": 146,
  76. "endColumn": 36
  77. }
  78. },
  79. "logicalLocations": [
  80. {
  81. "decoratedName": "?DisConnect@MultiDPC@@UEAAXXZ",
  82. "kind": "function"
  83. }
  84. ]
  85. }
  86. ]
  87. },
  88. {
  89. "ruleId": "C26812",
  90. "message": {
  91. "text": "枚举类型“_Packet_Cmd”未设定范围。相比于 \"enum\",首选 \"enum class\" (Enum.3)。"
  92. },
  93. "locations": [
  94. {
  95. "physicalLocation": {
  96. "artifactLocation": {
  97. "uri": "file:///E:/DIOS_V2/DriverPlatform/MultiDPC/MultiDPC.cpp"
  98. },
  99. "region": {
  100. "startLine": 224,
  101. "startColumn": 13,
  102. "endLine": 224,
  103. "endColumn": 48
  104. }
  105. },
  106. "logicalLocations": [
  107. {
  108. "decoratedName": "?Request@MultiDPC@@UEAA?AW4_Ret_Status@@PEAVResDataObject@@0@Z",
  109. "kind": "function"
  110. }
  111. ]
  112. }
  113. ]
  114. },
  115. {
  116. "ruleId": "C26812",
  117. "message": {
  118. "text": "枚举类型“_Action_Sync_Mode”未设定范围。相比于 \"enum\",首选 \"enum class\" (Enum.3)。"
  119. },
  120. "locations": [
  121. {
  122. "physicalLocation": {
  123. "artifactLocation": {
  124. "uri": "file:///E:/DIOS_V2/DriverPlatform/MultiDPC/MultiDPC.cpp"
  125. },
  126. "region": {
  127. "startLine": 232,
  128. "startColumn": 19,
  129. "endLine": 232,
  130. "endColumn": 64
  131. }
  132. },
  133. "logicalLocations": [
  134. {
  135. "decoratedName": "?Request@MultiDPC@@UEAA?AW4_Ret_Status@@PEAVResDataObject@@0@Z",
  136. "kind": "function"
  137. }
  138. ]
  139. }
  140. ]
  141. },
  142. {
  143. "ruleId": "C26495",
  144. "message": {
  145. "text": "未初始化变量 BaseJsonDataObject<bool>::m_Data。始终初始化成员变量(type.6)。"
  146. },
  147. "locations": [
  148. {
  149. "physicalLocation": {
  150. "artifactLocation": {
  151. "uri": "file:///E:/deliver/include/ResDataObject.h"
  152. },
  153. "region": {
  154. "startLine": 400,
  155. "startColumn": 2,
  156. "endLine": 400,
  157. "endColumn": 2
  158. }
  159. },
  160. "logicalLocations": [
  161. {
  162. "decoratedName": "??0?$BaseJsonDataObject@_N@@QEAA@XZ",
  163. "kind": "function"
  164. }
  165. ]
  166. }
  167. ],
  168. "properties": {
  169. "targetSymbol": "BaseJsonDataObject<bool>::m_Data"
  170. }
  171. }
  172. ],
  173. "tool": {
  174. "driver": {
  175. "name": "PREfast",
  176. "fullName": "PREfast Code Analysis",
  177. "version": "14.29.30147.0",
  178. "informationUri": "https://aka.ms/cpp/ca"
  179. }
  180. },
  181. "invocations": [
  182. {
  183. "commandLine": "\"d:\\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 -zm0x00B2C1B0 -allChunksReserved -il C:\\Users\\ecom\\AppData\\Local\\Temp\\_CL_4d0cb28aast -typedil -f MultiDPC.cpp -Ze -D_MSC_EXTENSIONS -Zp16 -pc \\:/ -D_MSC_VER=1929 -D_MSC_FULL_VER=192930147 -D_MSC_BUILD=0 -D_M_AMD64=100 -ZILP448 -D_M_X64=100 -D_WIN64 -D_WIN32 -GR -D_CPPRTTI -nologo -W 3 -diagnostics:column -D_GUARDOVERFLOW_CRT_ALLOCATORS=1 -GF -Og -Ot -Oy -Oi -ltcg -DCODE_ANALYSIS -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DMULTIDPC_EXPORTS -D_WINDLL -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\\MultiDPCX64.pch -Fox64\\Release\\MultiDPC.obj -Fdx64\\Release\\vc142.pdb -external:W 3 -Gd -analyze:projectdirectory E:\\DIOS_V2\\DriverPlatform\\MultiDPC -analyze:rulesetdirectory ;d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\\\Rule Sets; -analyze:ruleset d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\Rule Sets\\NativeRecommendedRules.ruleset -analyze:quiet -analyze:plugin d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\EspXEngine.dll -FC -errorreport:prompt -I E:\\deliver\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.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",
  184. "executionSuccessful": true
  185. }
  186. ],
  187. "artifacts": [
  188. {
  189. "location": {
  190. "uri": "file:///E:/DIOS_V2/DriverPlatform/MultiDPC/MultiDPC.cpp"
  191. },
  192. "roles": [
  193. "analysisTarget",
  194. "resultFile"
  195. ],
  196. "hashes": {
  197. "md5": "4ed2d9d366518d7c5d6c12b773a97ca1"
  198. }
  199. },
  200. {
  201. "location": {
  202. "uri": "file:///E:/deliver/include/ResDataObject.h"
  203. },
  204. "roles": [
  205. "resultFile"
  206. ],
  207. "hashes": {
  208. "md5": "5952703846c703003535fa667ae9a289"
  209. }
  210. },
  211. {
  212. "location": {
  213. "uri": "file:///e:/dios_v2/driverplatform/multidpc/stdafx.h"
  214. },
  215. "hashes": {
  216. "md5": "1670d257289af5a4bf0cc9741805575e"
  217. }
  218. },
  219. {
  220. "location": {
  221. "uri": "file:///e:/dios_v2/driverplatform/multidpc/targetver.h"
  222. },
  223. "hashes": {
  224. "md5": "20a1397a4f718d91f76e2681bef085b6"
  225. }
  226. },
  227. {
  228. "location": {
  229. "uri": "file:///e:/deliver/include/cdi.h"
  230. },
  231. "hashes": {
  232. "md5": "9e80d05743150a2349832daa11b23472"
  233. }
  234. },
  235. {
  236. "location": {
  237. "uri": "file:///e:/deliver/include/definitions.h"
  238. },
  239. "hashes": {
  240. "md5": "07878c897e77929c249016920da5e648"
  241. }
  242. },
  243. {
  244. "location": {
  245. "uri": "file:///e:/deliver/include/diosfilehandle.h"
  246. },
  247. "hashes": {
  248. "md5": "d7b028d6b156db169d9b66dfa079c3e2"
  249. }
  250. },
  251. {
  252. "location": {
  253. "uri": "file:///e:/deliver/include/dioslock.h"
  254. },
  255. "hashes": {
  256. "md5": "19f422bc4ce2ba8a2fd99f23bd1218fc"
  257. }
  258. },
  259. {
  260. "location": {
  261. "uri": "file:///e:/dios_v2/driverplatform/multidpc/multidpc.h"
  262. },
  263. "hashes": {
  264. "md5": "99f0cda0e62645a970bb851b9c399355"
  265. }
  266. },
  267. {
  268. "location": {
  269. "uri": "file:///e:/deliver/include/logicdriver.h"
  270. },
  271. "hashes": {
  272. "md5": "1f6fc16ba6c0414d0f15c0c0ffc9f2f9"
  273. }
  274. },
  275. {
  276. "location": {
  277. "uri": "file:///e:/deliver/include/dpc.h"
  278. },
  279. "hashes": {
  280. "md5": "f041f405e6f932a8c1cf3520a56fede0"
  281. }
  282. },
  283. {
  284. "location": {
  285. "uri": "file:///e:/deliver/include/logger.h"
  286. },
  287. "hashes": {
  288. "md5": "dcc81685c0ed303899127b874b73f16e"
  289. }
  290. },
  291. {
  292. "location": {
  293. "uri": "file:///e:/deliver/include/logicdevice.h"
  294. },
  295. "hashes": {
  296. "md5": "4412949d99d7097322c97f1ebf6fde34"
  297. }
  298. },
  299. {
  300. "location": {
  301. "uri": "file:///e:/deliver/include/common_api.h"
  302. },
  303. "hashes": {
  304. "md5": "b3fe9e47713eb74ad1294f29077c8a8a"
  305. }
  306. },
  307. {
  308. "location": {
  309. "uri": "file:///e:/deliver/include/packetanalizer.h"
  310. },
  311. "hashes": {
  312. "md5": "7fa7a13e7c88c4eb71b8926741a67149"
  313. }
  314. }
  315. ]
  316. }
  317. ]
  318. }