-
-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update codeql.yml to exclude YAML front-matter and Liquid code #6548
Comments
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
I'll be at the meeting tomorrow to discuss this issue. I would like to edit the codeql-scan-job.yml file and test but not entirely sure how to do this |
Progress: This week I was able to successfully reproduce the issue with my fork by starting a codeql scan. I have something to test against. I am considering modifying the codeql.yml file or codeql-scan-job.yml and then running a test again to see if that solves the issue. I also started watching a docker youtube tutorial Blockers: I don't know enough about containers, specifically docker. To remedy this I am going through a docker youtube tutorial. I am hoping at the end of this I'll have some answers. Availability: roughly 5 hours a week Eta: no idea there's a lot to learn |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Progress: Not making a lot of progress with this. Didn't have much time this week to do anything! Blockers: I don't know enough about containers, specifically docker. To remedy this I am going through a docker youtube tutorial. I am hoping at the end of this I'll have some answers. Availability: roughly 5 hours a week Eta: no idea there's a lot to learn |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @duojet2ez ! Thanks for working on this issue. If you're still working, please add an update. If you need some help, please consider leaving more detailed information about your blocker and placing it in the |
Hello! Yes, sorry I have been away and just getting back into things. Haven't been able to look at this issue past few weeks but starting today I will have time. I'll be at meeting this Sunday Nov 10. I have about 4 hours a week to devote to this. It might not be a bad idea to get someone else working on this as well.. |
It's all good if you're moving slowly as this doesn't appear to be time sensitive, but if haven't been able to get the help you need from the team and you're still feeling stuck, let us know. It is a possibility to put this back in the backlog and have you choose another issue. Moving slowly is totally okay though, do just keep us updated weekly so we know you're still working on it. |
This comment has been minimized.
This comment has been minimized.
I am reviewing my notes on this issue today (nov 16) and getting back to it -- specifically researching containers in docker. I will make this a priority next few weeks.. if I cannot progress any further by end of Nov will reach out for help. |
This comment has been minimized.
This comment has been minimized.
Progress: I am creating a basic website/page using jekyll along with liquid and front matter syntax. Then attempting to scan with codeql to recreate this error... I am trying to better understand how jekyll/liquid/front matter interact Blockers: None right now Availability: 5 hours this week ETA: I'll be done with this sub problem Dec 9.. once I solve this locally with a small example hopefully I will be able to extrapolate to the website |
Please add update using the below template (even if you have a pull request). Afterwards, remove the '2 weeks inactive' label and add the 'Status: Updated' label.
If you need help, be sure to either: 1) place your issue in the You are receiving this comment because your last comment was before Monday, December 30, 2024 at 11:04 PM PST. |
Overview
Many of our Javascript and HTML code files cannot be scanned by CodeQL as-is because they contain non-JS Liquid code
{% ... %}
or YAML front matter--- ... ---
, which cause syntax errors. We need to try and resolve these errors without removing all non-JS code.Details
The error message "Could not process some files due to syntax errors" indicates that these "syntax errors" may prevent CodeQL from scanning the files below (see issue #5234 for details).
hamburger-nav.js
: YAML front-matter with a titletoolkit.js
: 1 line of Liquid, empty YAML front-matterwins.js
: 2 lines (Liquid), empty YAML front-matterproject.js
: 2 lines (Liquid), empty YAML front-matterabout.js
: for loop (Liquid), empty YAML front-mattercurrent-project.js
: 2 lines + for loop (Liquid), empty YAML front-matterScreenshot: CodeQL error message
Simply deleting the Liquid lines would break the site (and CodeQL raised those errors accordingly in testing), so an alternative, holistic solution is required.
Action Items
Testing
.codeql-scan-job.yml
workflow.Resources/Instructions
Possible Solutions
Here are two possible solutions (in order of preference) to this problem. Please use your best judgment, these are only recommendations.
Option 1
This approach is preferred because it is
Define a new CodeQL query file that excludes Liquid and YAML patterns within JavaScript files.
Create a file named exclude-patterns.ql
Then modify codeql-scan-job.yml file to use the new query file for analysis. Update the queries section in the Initialize CodeQL step to include the new query file:
Option 2
Exclude liquid code and YAML front matter patterns from the CodeQL analysis within `codeql-scan-job.yml`
The text was updated successfully, but these errors were encountered: