This repository was archived by the owner on Sep 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +59
-0
lines changed
Expand file tree Collapse file tree 8 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ # CodeQL LearningLab Course Action Template
2+
3+ Copy this entire directory,
4+ and replace the following:
5+
6+ * Replace ` <owner> ` , ` <repo> ` and ` <pkg> ` in the ` image ` property in
7+ [ ` action.yml ` ] ( action.yml ) to reference the correct repository
8+ where the docker image will be published,
9+ and with a package name of your choice.
10+ (For courses in this repository,
11+ we use the convention of taking the course path,
12+ and replacing slashes with dashes,
13+ e.g. ` courses/cpp/ctf-segv ` becomes ` courses-cpp-ctf-segv ` )
14+ * Replace the zip file URL in [ ` image/Dockerfile ` ] ( image/Dockerfile )
15+ to point to the CodeQL database that will be used in your course.
16+
17+ After this,
18+ update [ ` answers/ ` ] ( answers ) and [ ` image/config/ ` ] ( image/config )
19+ to add your model answers and expected query results as appropriate.
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://docker.pkg.github.com/github/codeql-learninglab-actions/courses-cpp-uboot'
7+ branding :
8+ icon : ' check-circle'
9+ color : ' purple'
Original file line number Diff line number Diff line change 1+ name : codeql-uboot
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.8
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/uboot/u-boot_u-boot_cpp-srcVersion_d0d07ba86afc8074d79e436b1ba4478fa0f0c1b5-dist_odasa-2019-07-25-linux64.zip -O database.zip && unzip -qq database.zip && rm -rf database.zip
Original file line number Diff line number Diff line change 1+ {
2+ "databasePath" : " u-boot_u-boot_d0d07ba" ,
3+ "locationPaths" : " https://github.com/u-boot/u-boot/blob/d0d07ba86afc8074d79e436b1ba4478fa0f0c1b5{path}#L{line-start}-L{line-end}" ,
4+ "expectedResults" : {
5+ "step-01.ql" : false
6+ }
7+ }
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