练习Test方法
SAST, DAST, SAC
SAST案例二
snapshot:
搜索Dependency和CodeQL,点击congirure按钮
查看执行情况
Close: 遇到一个问题无法修复,关闭问题。
点击问题标题。
点击Dismiss alert关闭问题。
修复问题:
Dependabot alerts
升级版本即可。
Bump mysql-connector-java from 8.0.27 to 8.0.28
Code scanning alerts
Unsafe expansion of self-closing HTML tag
参考意见,使用高版本净化库?我这里直接使用3.5版本的代码进行替换。(项目版本是jQuery JavaScript Library v3.3.1)
Recommendation
Use a well-tested sanitization library if at all possible, and avoid modifying sanitized values further before treating them as HTML.
An even safer alternative is to design the application so that sanitization is not needed, for instance by using HTML templates that are explicit about the values they treat as HTML.
代码差异
这个问题不知道如何修复。我查看了最新的jQuery UI - v1.13.2 - 2022-07-14代码
Reference:
Free for Open Source Application Security Tools
https://owasp.org/www-community/Free_for_Open_Source_Application_Security_Tools
What is GitHub Code Scanning? Find VULNERABILITIES in your code
https://www.youtube.com/watch?v=A8SERCUE-i4
github 测试项目地址
https://github.com/WillingChin/itmd4515-s22-fp
jquery-3.5.0
https://code.jquery.com/jquery-3.5.0.slim.js
jquery-ui-1.13.2
https://jqueryui.com/resources/download/jquery-ui-1.13.2.zip