This repository was archived by the owner on Sep 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +69
-0
lines changed
Expand file tree Collapse file tree 11 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 2222
2323 - name : Build Images & Run Queries
2424 run : cd courses/cpp/ctf-segv && ../../../scripts/test-course-latest.sh
25+ test-courses-template-actual :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v1
30+
31+ - name : Login to docker
32+ run : docker login docker.pkg.github.com -u github-actions -p ${{ secrets.GITHUB_TOKEN }}
33+
34+ - name : Build Images & Run Queries
35+ run : cd courses/template && ../../scripts/test-course-actual.sh
36+ test-courses-template-latest :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - name : Checkout
40+ uses : actions/checkout@v1
41+
42+ - name : Build Images & Run Queries
43+ run : cd courses/template && ../../scripts/test-course-latest.sh
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ including links to the lines of source code on GitHub when possible:
2121
2222![ ] ( docs/comment_screenshot.png )
2323
24+ <!-- TODO: add README table of contents -->
25+
2426## Creating your own course
2527
2628There are two main components to any Learning Lab course for CodeQL that uses
@@ -110,6 +112,7 @@ we recommend structuring your course folder like so:
110112
111113```
112114├── answers <─── Model Answers
115+ │ ├── qlpack.yml
113116│ ├── step-01.ql <─┬─ Answers with expected paths
114117│ ├── step-02.ql <─┤ (relative to answers/)
115118│ └── ... <─┘ as specified in config.json
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # TODO: move to /scripts/
4+
35set -e
46set -x
57
Original file line number Diff line number Diff line change 1+ name : ' Check queries'
2+ description : ' Check that the queries that have been pushed produce the correct results'
3+ author : ' GitHub <opensource+codeql-learninglab-actions@github.com>'
4+ runs :
5+ using : ' docker'
6+ image : ' docker.pkg.github.com/<owner>/<repo>/<pkg>'
7+ branding :
8+ icon : ' check-circle'
9+ color : ' purple'
Original file line number Diff line number Diff line change 1+ name : course-template
2+ version : 0.0.0
3+ libraryPathDependencies : codeql-cpp # Update this with appropriate language
Original file line number Diff line number Diff line change 1+ import cpp
2+
3+ from Function f
4+ where f .getName ( ) = "getchar"
5+ select f
Original file line number Diff line number Diff line change 1+ import cpp
2+
3+ from Function f
4+ where f .getName ( ) = "getchar"
5+ select f
Original file line number Diff line number Diff line change 1+ FROM docker.pkg.github.com/github/codeql-learninglab-actions/codeql-learninglab-check:v0.0.6
2+
3+ # # Add course config
4+ COPY --chown=codeql:codeql config /home/codeql/config
5+ WORKDIR /home/codeql/config
6+ # Download, unzip and then delete the zip file in one step to reduce image size
7+ RUN wget --quiet https://downloads.lgtm.com/snapshots/cpp/GNU/glibc/bminor_glibc_cpp-srcVersion_333221862ecbebde60dd16e7ca17d26444e62f50-dist_odasa-lgtm-2019-04-08-af06f68-linux64.zip -O snapshot.zip && unzip -qq snapshot.zip && rm -rf snapshot.zip
Original file line number Diff line number Diff line change 1+ {
2+ "snapshotPath" : " bminor_glibc_3332218" ,
3+ "locationPaths" : " https://github.com/<org>/<repo>/blob/<sha>{path}#L{line-start}-L{line-end}" ,
4+ "expectedResults" : {
5+ "step-01.ql" : " step-01.csv" ,
6+ "step-02.ql" : " step-02.csv"
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ "f","URL for f","col1"
2+ "getchar","file:///opt/src/libio/getchar.c:33:1:33:7","a getchar function"
3+ "getchar","file:///opt/src/libio/bits/stdio.h:47:1:47:7","a getchar function"
4+ "getchar","file:///opt/src/libio/bits/stdio.h:47:1:47:7","a getchar function"
You can’t perform that action at this time.
0 commit comments