LogicDriver.nativecodeanalysis.sarif 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  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/LogicDriver/LogicDriver.cpp"
  17. },
  18. "region": {
  19. "startLine": 45,
  20. "startColumn": 27,
  21. "endLine": 45,
  22. "endColumn": 39
  23. }
  24. },
  25. "logicalLocations": [
  26. {
  27. "decoratedName": "??0LogicDriver@@QEAA@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:/DeviceV3.0/DriverPlatform-V3.1/LogicDriver/LogicDriver.cpp"
  44. },
  45. "region": {
  46. "startLine": 202,
  47. "startColumn": 6,
  48. "endLine": 202,
  49. "endColumn": 26
  50. }
  51. },
  52. "logicalLocations": [
  53. {
  54. "decoratedName": "?GetDeviceResource@LogicDriver@@UEAA?AW4_Ret_Status@@PEAVResDataObject@@@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/LogicDriver/LogicDriver.cpp"
  71. },
  72. "region": {
  73. "startLine": 277,
  74. "startColumn": 13,
  75. "endLine": 277,
  76. "endColumn": 48
  77. }
  78. },
  79. "logicalLocations": [
  80. {
  81. "decoratedName": "?Request@LogicDriver@@UEAA?AW4_Ret_Status@@PEAVResDataObject@@0@Z",
  82. "kind": "function"
  83. }
  84. ]
  85. }
  86. ]
  87. },
  88. {
  89. "ruleId": "C26812",
  90. "message": {
  91. "text": "枚举类型“_Action_Sync_Mode”未设定范围。相比于 \"enum\",首选 \"enum class\" (Enum.3)。"
  92. },
  93. "locations": [
  94. {
  95. "physicalLocation": {
  96. "artifactLocation": {
  97. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/LogicDriver/LogicDriver.cpp"
  98. },
  99. "region": {
  100. "startLine": 285,
  101. "startColumn": 19,
  102. "endLine": 285,
  103. "endColumn": 64
  104. }
  105. },
  106. "logicalLocations": [
  107. {
  108. "decoratedName": "?Request@LogicDriver@@UEAA?AW4_Ret_Status@@PEAVResDataObject@@0@Z",
  109. "kind": "function"
  110. }
  111. ]
  112. }
  113. ]
  114. },
  115. {
  116. "ruleId": "C28159",
  117. "message": {
  118. "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"
  119. },
  120. "locations": [
  121. {
  122. "physicalLocation": {
  123. "artifactLocation": {
  124. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/LogicDriver/LogicDriver.cpp"
  125. },
  126. "region": {
  127. "startLine": 721,
  128. "startColumn": 24,
  129. "endLine": 721,
  130. "endColumn": 36
  131. }
  132. },
  133. "logicalLocations": [
  134. {
  135. "decoratedName": "?DisConnect@LogicDriver@@UEAAXXZ",
  136. "kind": "function"
  137. }
  138. ]
  139. }
  140. ]
  141. },
  142. {
  143. "ruleId": "C26495",
  144. "message": {
  145. "text": "未初始化变量 BaseJsonDataObject<unsigned long>::m_Data。始终初始化成员变量(type.6)。"
  146. },
  147. "locations": [
  148. {
  149. "physicalLocation": {
  150. "artifactLocation": {
  151. "uri": "file:///E:/DeviceV3.0/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@K@@QEAA@XZ",
  163. "kind": "function"
  164. }
  165. ]
  166. }
  167. ],
  168. "properties": {
  169. "targetSymbol": "BaseJsonDataObject<unsigned long>::m_Data"
  170. }
  171. },
  172. {
  173. "ruleId": "C26495",
  174. "message": {
  175. "text": "未初始化变量 BaseJsonDataObject<bool>::m_Data。始终初始化成员变量(type.6)。"
  176. },
  177. "locations": [
  178. {
  179. "physicalLocation": {
  180. "artifactLocation": {
  181. "uri": "file:///E:/DeviceV3.0/deliver/include/ResDataObject.h"
  182. },
  183. "region": {
  184. "startLine": 400,
  185. "startColumn": 2,
  186. "endLine": 400,
  187. "endColumn": 2
  188. }
  189. },
  190. "logicalLocations": [
  191. {
  192. "decoratedName": "??0?$BaseJsonDataObject@_N@@QEAA@XZ",
  193. "kind": "function"
  194. }
  195. ]
  196. }
  197. ],
  198. "properties": {
  199. "targetSymbol": "BaseJsonDataObject<bool>::m_Data"
  200. }
  201. }
  202. ],
  203. "tool": {
  204. "driver": {
  205. "name": "PREfast",
  206. "fullName": "PREfast Code Analysis",
  207. "version": "14.29.30133.0",
  208. "informationUri": "https://aka.ms/cpp/ca"
  209. }
  210. },
  211. "invocations": [
  212. {
  213. "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_5aca0674ast -typedil -f LogicDriver.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 -GF -Og -Ot -Oy -Oi -ltcg -DCODE_ANALYSIS -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DLOGICDRIVER_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\\LogicDriverX64.pch -Fox64\\Release\\LogicDriver.obj -Fdx64\\Release\\vc142.pdb -external:W 3 -Gd -analyze:projectdirectory E:\\DeviceV3.0\\DriverPlatform-V3.1\\LogicDriver -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 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",
  214. "executionSuccessful": true
  215. }
  216. ],
  217. "artifacts": [
  218. {
  219. "location": {
  220. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/LogicDriver/LogicDriver.cpp"
  221. },
  222. "roles": [
  223. "analysisTarget",
  224. "resultFile"
  225. ],
  226. "hashes": {
  227. "md5": "f144b7fb1336d10a29e35f2f7a6d53f9"
  228. }
  229. },
  230. {
  231. "location": {
  232. "uri": "file:///E:/DeviceV3.0/deliver/include/ResDataObject.h"
  233. },
  234. "roles": [
  235. "resultFile"
  236. ],
  237. "hashes": {
  238. "md5": "5952703846c703003535fa667ae9a289"
  239. }
  240. },
  241. {
  242. "location": {
  243. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/logicdriver/stdafx.h"
  244. },
  245. "hashes": {
  246. "md5": "1670d257289af5a4bf0cc9741805575e"
  247. }
  248. },
  249. {
  250. "location": {
  251. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/logicdriver/targetver.h"
  252. },
  253. "hashes": {
  254. "md5": "20a1397a4f718d91f76e2681bef085b6"
  255. }
  256. },
  257. {
  258. "location": {
  259. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/logicdriver/logicdriver.h"
  260. },
  261. "hashes": {
  262. "md5": "6ab7ed4945fd8cc0adcd28c4df5b3f1f"
  263. }
  264. },
  265. {
  266. "location": {
  267. "uri": "file:///e:/devicev3.0/deliver/include/dpc.h"
  268. },
  269. "hashes": {
  270. "md5": "8ae61aba6b81f2201447216e9314b335"
  271. }
  272. },
  273. {
  274. "location": {
  275. "uri": "file:///e:/devicev3.0/deliver/include/definitions.h"
  276. },
  277. "hashes": {
  278. "md5": "1b36a119d096288c057adf16222c01a8"
  279. }
  280. },
  281. {
  282. "location": {
  283. "uri": "file:///e:/devicev3.0/deliver/include/logicdevice.h"
  284. },
  285. "hashes": {
  286. "md5": "8f36b6e7ec2db97cac2b562a94939c1c"
  287. }
  288. },
  289. {
  290. "location": {
  291. "uri": "file:///e:/devicev3.0/deliver/include/dioslock.h"
  292. },
  293. "hashes": {
  294. "md5": "6ef694600e306d1039fe501b0e4db656"
  295. }
  296. },
  297. {
  298. "location": {
  299. "uri": "file:///e:/devicev3.0/deliver/include/diosfilehandle.h"
  300. },
  301. "hashes": {
  302. "md5": "84c6a7455068dd69e1ec839c294b7761"
  303. }
  304. },
  305. {
  306. "location": {
  307. "uri": "file:///e:/devicev3.0/deliver/include/diosthread.h"
  308. },
  309. "hashes": {
  310. "md5": "bcf85fc2a8499ba80fd45eee229dd64c"
  311. }
  312. },
  313. {
  314. "location": {
  315. "uri": "file:///e:/devicev3.0/deliver/include/msgqueue.h"
  316. },
  317. "hashes": {
  318. "md5": "73927cf318a5240ea737c7748703f3fc"
  319. }
  320. },
  321. {
  322. "location": {
  323. "uri": "file:///e:/devicev3.0/deliver/include/scopelock.h"
  324. },
  325. "hashes": {
  326. "md5": "fe1c154331759bc62a8157897df388f0"
  327. }
  328. },
  329. {
  330. "location": {
  331. "uri": "file:///e:/devicev3.0/deliver/include/common_api.h"
  332. },
  333. "hashes": {
  334. "md5": "88b1032a5ae2600400bf90500d1e476e"
  335. }
  336. },
  337. {
  338. "location": {
  339. "uri": "file:///e:/devicev3.0/deliver/include/packetanalizer.h"
  340. },
  341. "hashes": {
  342. "md5": "870d4c0a9d1b3e9f3abc69d28ab21c5e"
  343. }
  344. }
  345. ]
  346. }
  347. ]
  348. }