Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aegilops/codeql-java-hello-world
Hello world Java app and queries
https://github.com/aegilops/codeql-java-hello-world
Last synced: 5 days ago
JSON representation
Hello world Java app and queries
- Host: GitHub
- URL: https://github.com/aegilops/codeql-java-hello-world
- Owner: aegilops
- Created: 2024-02-27T15:04:54.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-11T11:41:54.000Z (5 days ago)
- Last Synced: 2024-11-11T12:30:45.181Z (5 days ago)
- Language: CodeQL
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hello, World Java app and basic CodeQL queries
This is a small Java app to demonstrate how to use CodeQL to find program patterns in code.
It prints "Hello, World!" to the console, and "Hello, foo!" if the first command-line argument is "foo".
It has no error handling, so will throw an exception if no command-line arguments are provided.
## Using with GitHub Advanced Security
Fork the repository to a public repository, allow running the CodeQL workflow, and see the CodeQL results.
## Using locally
### Requirements
- Java 8 or later
- CodeQL CLI
- VSCode
- GitHub CLI
- GNU Make (though you can just use the commands in the `Makefile`, they are not complicated)### Set up the CodeQL CLI and VSCode Starter workspace
You can [follow these instructions on how to get set up with CodeQL](https://github.com/codeql-workshops/codeql-learning-catalog/tree/master/docs/QLC/100).
It relies on the [GitHub CLI](https://cli.github.com/), and VSCode so grab them first if you haven't already.
### Build the app
```bash
make Main
```### Run the app (optional)
```bash
make run
```### Build the CodeQL database
```bash
make clean && make
```### Run the CodeQL queries
Use the VSCode Starter workspace to load the CodeQL database and run the queries.
## License
This is a copyrighted work, and is not released under an open source license.
© Copyright 2024 GitHub, Inc.