-
-
Notifications
You must be signed in to change notification settings - Fork 331
Add CodeQL workflow for GitHub code scanning #34
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
.github/workflows/codeql.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: "CodeQL" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: "3 23 * * 5" | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: [ javascript, python ] | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v2 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| queries: +security-and-quality | ||
|
|
||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@v2 | ||
| if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }} | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v2 | ||
| with: | ||
| category: "/language:${{ matrix.language }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 32 additions & 35 deletions
backend/templates/base.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,34 @@ | ||
| {% load cms_tags static sekizai_tags menu_tags %} | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>{% block title %}This is my new project home page{% endblock title %}</title> | ||
| <meta name="viewport" content="width=device-width,initial-scale=1"> | ||
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | ||
| <!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> --> | ||
| {% render_block "css" %} | ||
| <!DOCTYPE html>{% load cms_tags menu_tags sekizai_tags static i18n %}{% spaceless %} | ||
| <html lang="{{ LANGUAGE_CODE }}"> | ||
| <head> | ||
| <meta charset="utf-8"/> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/> | ||
| {% block meta %} | ||
| <meta name="description" content="{% page_attribute meta_description %}"/> | ||
| <meta property="og:type" content="website"/> | ||
| <meta property="og:title" content="{% page_attribute "page_title" %}"/> | ||
| <meta property="og:description" content="{% page_attribute meta_description %}"/> | ||
| {% endblock meta %} | ||
| {% block canonical_url %} | ||
| <link rel="canonical" href="{{ request.build_absolute_uri }}"/> | ||
| <meta property="og:url" content="{{ request.build_absolute_uri }}"/> | ||
| {% endblock canonical_url %} | ||
| {% block fb_meta %}{% endblock fb_meta %} | ||
| <title>{% block title %}{% page_attribute "page_title" %}{% endblock %}</title> | ||
| {% block base_css %}{% endblock %} | ||
| {% endspaceless %}{% render_block 'css' %}{% spaceless %} | ||
| {% block page_head %}{% endblock %} | ||
| </head> | ||
| <body> | ||
| {% cms_toolbar %} | ||
| <div class="container-fluid"> | ||
| <div class="navbar navbar-light bg-light" role="navigation"> | ||
| <div class="navbar-header"> | ||
| <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
| <span class="navbar-toggler-icon"></span> | ||
| </button> | ||
| <a class="navbar-brand" href="/">Project name</a> | ||
| </div> | ||
| <div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
| <ul class="navbar-nav mr-auto"> | ||
| {% show_menu 0 1 100 100 "menu.html" %} | ||
| </ul> | ||
| </div> | ||
| </div> | ||
| {% block content %}{% endblock content %} | ||
| </div> | ||
| <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | ||
| <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> | ||
|
|
||
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> | ||
| <!-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script> --> | ||
| {% render_block "js" %} | ||
| <body {% block body_attrs %}{% endblock %}> | ||
| {% endspaceless %}{% cms_toolbar %}{% spaceless %} | ||
| {% block navbar %}{% endblock %} | ||
| {% block content %} | ||
| {% placeholder "Content" %} | ||
| {% endblock content %} | ||
| {% block base_js %}{% endblock %} | ||
| {% endspaceless %}{% render_block 'js' %}{% spaceless %} | ||
| {% block end_js %}{% endblock %} | ||
| {% block bottom_css %}{% endblock %} | ||
| </body> | ||
| </html> | ||
| </html>{% endspaceless %} |
21 changes: 21 additions & 0 deletions
backend/templates/bootstrap5.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| {% extends "base.html" %}{% load cms_tags menu_tags %} | ||
| {% block base_css %} | ||
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous"/> | ||
| {% endblock %} | ||
| {% block base_js %} | ||
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script> | ||
| {% endblock %} | ||
| {% block navbar %} | ||
| <nav class="navbar {% block navbar_options %}navbar-expand-lg navbar-dark bg-dark{% endblock %}"> | ||
| <div class="container"> | ||
| <a class="navbar-brand" href="/">{% block brand %}{% endblock %}</a> | ||
| <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
| <span class="navbar-toggler-icon"></span> | ||
| </button> | ||
| <div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
| <ul class="navbar-nav me-auto mb-2 mb-lg-0">{% block menubar %}{% show_menu 0 100 0 100 'menu/menu.html' %}{% endblock %}</ul> | ||
| {% block searchbar %}{% endblock %} | ||
| </div> | ||
| </div> | ||
| </nav> | ||
| {% endblock %} |
13 changes: 0 additions & 13 deletions
backend/templates/feature.html
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
backend/templates/menu.html
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
backend/templates/menu/dropdown.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| {% load i18n menu_tags cache %} | ||
| {% for child in children %} | ||
| {% if child.get_menu_title|first == ' ' %} | ||
| <div class="dropdown-divider"></div> | ||
| {% endif %} | ||
| <a class="dropdown-item" href="{{ child.get_absolute_url }}"><span>{{ child.get_menu_title }}</span></a> | ||
| {% endfor %} |
13 changes: 13 additions & 0 deletions
backend/templates/menu/menu.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| {% load i18n menu_tags cache %}{% spaceless %} | ||
| {% for child in children %} | ||
| <li class="nav-item text-center {% if child.ancestor %}ancestor{% endif %}{% if child.children %} dropdown{% endif %}"> | ||
| {% if child.children %}<a class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" href="{{ child.get_absolute_url }}" id="menu-{{ child.id|safe }}">{{ child.get_menu_title }}</a> | ||
| <div class="dropdown-menu" aria-labelledby="menu-{{ child.ancestor.id|safe }}"> | ||
| {% show_menu from_level to_level extra_inactive extra_active "menu/dropdown.html" "" "" child %} | ||
| </div> | ||
| {% else %} | ||
| <a class="nav-link{% if child.selected %} active{% endif %}" href="{{ child.get_absolute_url }}"><span>{{ child.get_menu_title }}</span></a> | ||
| {% endif %} | ||
| </li> | ||
| {% endfor %} | ||
| {% endspaceless %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
backend/templates/page.html
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.