Skip to content
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

Pull request for overall code review of ANAC project 2024 #4313

Closed
wants to merge 643 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
643 commits
Select commit Hold shift + click to select a range
a01ce74
questionnaire answers for forwarded tip
Oct 15, 2024
4e2350d
Merge branch 'feature/test/segnalazioni' of https://e.bosu:G3JPgbFaRX…
Oct 15, 2024
ea6abc1
progress in form for forwarded dip (oe)
Oct 15, 2024
d10c6b6
Update submission.py
Oct 15, 2024
4250436
Update __init__.py and submission.py
Oct 16, 2024
3360641
date tipe in oe form
Oct 16, 2024
723ce2b
clean code and bugfixing
Oct 16, 2024
84476d2
form for forwarded tip - type tos
Oct 16, 2024
69038b2
Update __init__.py
Oct 16, 2024
d68464d
Update requests.py
Oct 16, 2024
95d2792
Merge branch 'feature/test/segnalazioni' of https://e.bosu:G3JPgbFaRX…
Oct 16, 2024
2abde61
Backup's implementation
Oct 16, 2024
c77e0ad
Update __init__.py and __init__.py
Oct 17, 2024
9f09b31
Merge branch 'feature/test/segnalazioni' of https://e.bosu:G3JPgbFaRX…
Oct 17, 2024
3d3f960
forwarder report closing integration
Oct 17, 2024
f37e0a8
bugfixing
Oct 17, 2024
e66f661
REF: Implement changes necessary to load a secret and use it as secre…
Oct 17, 2024
120ff4b
Merge branch 'feature/test/segnalazioni' of https://e.bosu:G3JPgbFaRX…
Oct 17, 2024
e3a6884
Update __init__.py, submission.py, and 2 more files...
Oct 17, 2024
fc5ebeb
bugfixing
Oct 17, 2024
f326957
Update __init__.py
Oct 17, 2024
2e5237c
Merge branch 'feature/test/segnalazioni' of https://e.bosu:G3JPgbFaRX…
Oct 17, 2024
587fb48
REF: Implement changes necessary to load a secret and use it as secre…
Oct 17, 2024
f249c6b
closing fowarding bugfixing
Oct 17, 2024
338716b
Update accreditation.py and wizard.py
Oct 17, 2024
cae0aa5
bugfixing sendtip-detail
Oct 17, 2024
0a90c78
download permission for infected files in forwarding detail
Oct 18, 2024
4abd7bc
fix reset comments and files for selected oe
Oct 18, 2024
97ece45
clean code and bugfixing on upload-wbfile-component
Oct 18, 2024
7022e60
fix affiliated oe + clean code
Oct 18, 2024
68dec4b
clean code + default maximum number of comment
Oct 18, 2024
56ab34d
disable closing button for forwarded tip
Oct 18, 2024
a43319b
personal and internal file upload for oe
Oct 18, 2024
54fdee9
label fix
Oct 18, 2024
6c11e57
Close eo_tio on close forwarding
Oct 18, 2024
4b023ca
clean code
Oct 18, 2024
f5d62ca
Update user.py, __init__.py, and 2 more files...
Oct 18, 2024
5271828
Update __init__.py and requests.py
Oct 18, 2024
abac4a3
Close eo_tio on close forwarding
Oct 21, 2024
380513e
Update rtip.py
Oct 21, 2024
2b6cde8
Update rtip.py
Oct 21, 2024
b07c2be
fix html
Oct 21, 2024
7f792dd
Update __init__.py
Oct 21, 2024
191af53
fix for closed tip
Oct 21, 2024
c1a27e8
Update accreditation.py and utils.py
Oct 21, 2024
b9754db
bugfixing forwarding whistleblower file
Oct 21, 2024
59cb1fa
fix file size visualization
Oct 21, 2024
53d3c05
bugfixing file size and forwarding comments
Oct 21, 2024
7513ffe
Update __init__.py
Oct 21, 2024
9f0dfe5
fix disabled comments
Oct 21, 2024
a8d113a
new view for closed forwarded tip
Oct 21, 2024
55fcfd3
Update submission.py
Oct 21, 2024
cb8d3be
Update submission.py
Oct 21, 2024
ad07d42
Changed default backup's path
Oct 21, 2024
29483fa
First version of reports component
Oct 21, 2024
0b21379
fix comment visibility
Oct 21, 2024
8402ba5
Changed default configs
Oct 22, 2024
8494afd
bugfixing and test for language
Oct 22, 2024
f2d8617
clean code + download file in forwarding detail
Oct 22, 2024
fd9233d
bugfixing download wbfiles in forwardings
Oct 22, 2024
c63843e
label internazionalization
Oct 22, 2024
096f94b
wbfile download bugfixing
Oct 22, 2024
ee5b9db
removed unusued component
Oct 22, 2024
bdf6c3a
Update __init__.py, rtip.py, and 3 more files...
Oct 22, 2024
188e6a6
Merge branch 'devel' of https://e.bosu:[email protected]
Oct 22, 2024
a356212
clean commented code
Oct 22, 2024
868db90
Update accreditation.py
Oct 22, 2024
5939a15
Merge branch 'devel' of https://e.bosu:[email protected]
Oct 22, 2024
6727161
Update submission.py
Oct 22, 2024
e9479c7
Update __init__.py
Oct 22, 2024
df83ad5
Update accreditation.py
Oct 22, 2024
71965fa
Edited transaction's management in backup's job
Oct 22, 2024
94d8d65
upload file in forwarding form - oe
Oct 22, 2024
162ef4a
Add filter on status column on analyst reports
Oct 23, 2024
b700eab
bugfixing organization page + clean code
Oct 23, 2024
0f919fd
clean code
Oct 23, 2024
efa0e12
internationalization fix
Oct 23, 2024
5b0d241
Add filter to creation date column in analyst report, need to be comp…
Oct 23, 2024
4c6bcbb
Update accreditation.py and templating.py
Oct 23, 2024
caa7e59
Update accreditation.py, user.py, and 3 more files...
Oct 23, 2024
1619008
Update accreditation.py
Oct 24, 2024
10b51c5
routing fix in sendtip
Oct 24, 2024
5d8f05c
uploaded file in sendtip fix
Oct 24, 2024
bf780cc
Update rtip.py and serializers.py
Oct 24, 2024
0b2f1a1
complete filter on report date column on analyst reports, general lin…
Oct 24, 2024
5242ec0
maximum number of comments for oe to wb + clean code
Oct 24, 2024
c63b98c
forwarding form for oe
Oct 24, 2024
cc9b5ca
fix for hint in oe form
Oct 24, 2024
246234d
internationalization fix
Oct 24, 2024
10021ed
internationalization fix
Oct 24, 2024
7432c35
clean code
Oct 25, 2024
c1ce8bc
tip comments for wb in tippage
Oct 25, 2024
4ccc29b
fileupload not for statistical interest
Oct 25, 2024
0adf625
Add filter on all date columns on analyst report
Oct 25, 2024
e107507
complete analyst report component, mock response to be removed
Oct 25, 2024
2e1971e
voice records in oe form + clean code
Oct 25, 2024
aff6137
bugfixing
Oct 25, 2024
498db92
bugfixing
Oct 25, 2024
fde03b7
add checkbox fromLastBackup in audit-log, need to be completed
Oct 25, 2024
2bf14a5
Merge branch 'devel' of https://gitlab.anticorruzione.it/servizi-inte…
Oct 25, 2024
61afe59
accreditation-request page protection
Oct 25, 2024
7679a17
Changed job's interval
Oct 25, 2024
ec7950a
Cookie x-idp-userid redirect
Oct 25, 2024
7f8945c
fix for cookie x-idp-userid
Oct 28, 2024
7c8c804
regex validation in oe form
Oct 28, 2024
06188bc
Update accreditation.py, __init__.py, and globaleaks-69.db
Oct 28, 2024
b3b363e
Update config_desc.py
Oct 28, 2024
341f735
Update accreditation.py, config_desc.py, and 2 more files...
Oct 28, 2024
9d4bfdf
validation for required fields in forwarding form for oe
Oct 28, 2024
78b3539
Update accreditation.py
Oct 28, 2024
9cd10b0
complete backup component and enable auditlog backup checkbox
Oct 28, 2024
dbb7e72
oe form validation
Oct 28, 2024
4927cd7
Update user.py, globaleaks-69.db, and helpers.py
Oct 28, 2024
9d7be32
Update _trial_temp.lock, accreditation.py, and test_analyst.py
Oct 28, 2024
420035b
Audit log only for tenant 1
Oct 29, 2024
d0a470e
Bug fixing
Oct 29, 2024
fb05494
Update accreditation.py
Oct 29, 2024
7c8e358
comments from oe for wb
Oct 29, 2024
403c449
fix fiscal_code field
Oct 29, 2024
4fb94c8
fix on tids for uploading rfiles
Oct 29, 2024
1573a31
Added missing field
Oct 29, 2024
275f55f
fix sending tip to oe and closing forwarded tip - to test
Oct 29, 2024
c02e69e
Add email
Oct 29, 2024
b265db2
Pec configuration in notification
Oct 30, 2024
8bd5ee6
report component internationalization
Oct 30, 2024
2fc895d
internationalization fix
Oct 30, 2024
4672988
refactor and complete tip oe form
Oct 30, 2024
4b62e27
Update operation.py, config_desc.py, and requests.py
Oct 30, 2024
21ca857
Update __init__.py
Oct 30, 2024
c2d20c2
Update __init__.py
Oct 30, 2024
7b0de80
fix internazionalizzazione
Oct 30, 2024
56cb24b
oe names in tip list
Oct 30, 2024
a77e761
Update __init__.py
Oct 30, 2024
ad2d430
Merge branch 'devel' of https://e.bosu:[email protected]
Oct 30, 2024
c385404
Update accreditation.py, config_desc.py, and templating.py
Oct 30, 2024
a7e8c73
Update accreditation.py
Oct 30, 2024
e377417
fix internationalization
Oct 30, 2024
2ee0d44
Update accreditation.py and templating.py
Oct 30, 2024
12d89e3
Update __init__.py
Oct 30, 2024
ce31750
report page css fix
Oct 30, 2024
b3ec82f
Update accreditation.py and templating.py
Oct 30, 2024
7756b8c
Update __init__.py
Oct 30, 2024
ad7e69a
Fix analyst report select column of statistical interest on chart
Oct 30, 2024
0462415
Added questionnaire validation
Oct 30, 2024
d27b965
fix download confirmation translation
Oct 30, 2024
2e19d06
Update accreditation.py and templating.py
Oct 30, 2024
2a9a9f1
Update __init__.py
Oct 30, 2024
ade0cbc
Fix analyst menu report label
Oct 30, 2024
a9f16c8
fix css
Oct 30, 2024
b64f3c0
fix placeholder
Oct 30, 2024
91ff473
Fixed migration
Oct 30, 2024
e49ca75
Fixed accreditation's email
Oct 30, 2024
9a410b2
import options for multi-options fields
Oct 30, 2024
d653538
Added default values
Oct 31, 2024
7f17dd4
Update accreditation.py, __init__.py, and 5 more files...
Oct 31, 2024
2da743d
Update config_desc.py
Oct 31, 2024
e0067ef
Merge branch 'devel' of https://e.bosu:[email protected]
Oct 31, 2024
fcf74ba
Update utils.py
Oct 31, 2024
6779e59
update labels
Oct 31, 2024
d50a5e7
label fix + cf oe admin in accreditation page
Oct 31, 2024
8f2e655
Update config_desc.py and requests.py
Oct 31, 2024
27c0d1d
Merge branch 'devel' of https://e.bosu:[email protected]
Oct 31, 2024
8d9f181
new ui for eo detail
Oct 31, 2024
2de4b68
Update __init__.py
Oct 31, 2024
3d31368
fix organization overview
Oct 31, 2024
08193b9
banner-no-reply for OE comments to wb
Nov 4, 2024
0d1b5ef
select oe dropdown fix
Nov 4, 2024
cd99af5
fix for comments from oe to anac
Nov 4, 2024
6da4925
format and fix for comments from wb
Nov 4, 2024
1a0991a
fix EO details to show recipient comment
Nov 4, 2024
4f5156f
comments placeholder
Nov 4, 2024
7b34a08
bugfixing in files lists
Nov 4, 2024
25aa408
bugfixing for forwarded files list
Nov 4, 2024
fab0a02
filter select EO on send tip
Nov 4, 2024
4e28101
clean code
Nov 4, 2024
205524f
fix margin in sendtip page
Nov 4, 2024
ddfb292
max number of messages from oe to wb
Nov 4, 2024
8543940
bugfixing internazionalizzazione
Nov 4, 2024
d13616d
clean code
Nov 4, 2024
540d307
fix on tip component - test for sonarqube
Nov 4, 2024
8ca7a7c
fix voice recorder
Nov 4, 2024
da3ca6e
clean code
Nov 4, 2024
302b1b1
clean code
Nov 4, 2024
ffa74fd
clean code
Nov 4, 2024
966f883
Update migration.py, __init__.py, and 24 more files...
Nov 4, 2024
cb34c6c
Update state.py
Nov 4, 2024
783f8c1
Update accreditation.py
Nov 4, 2024
1b13a9b
test for redirect to onboarding
Nov 4, 2024
5e19bc9
fix upload files on send tip
Nov 5, 2024
7b80423
pec authentication flag
Nov 5, 2024
ba206c0
Update requests.py
Nov 5, 2024
e4deb09
Merge branch 'devel' of https://e.bosu:[email protected]
Nov 5, 2024
0e18a1b
bugfixing questionnaire answers + clean code
Nov 5, 2024
94e2fbf
css fix
Nov 5, 2024
9a9ad46
Update __init__.py
Nov 5, 2024
b8a302c
fix translate on sendtip-detail
Nov 5, 2024
60f7cae
Fix translate on sendtip-file-upload
Nov 5, 2024
ff99894
Update operation.py, __init__.py, and state.py
Nov 5, 2024
2297c34
Update services.py
Nov 6, 2024
521d18c
fix for placeholder translation
Nov 6, 2024
3a0f11c
fix comments placeholder
Nov 6, 2024
98dc869
never delete oe primary recipient
Nov 6, 2024
48dee7d
internationalization
Nov 6, 2024
8a1119d
Hide admin-info and recipient-info cards when state is instructor_req…
Nov 6, 2024
8b65d53
Update fw_mail.py
Nov 6, 2024
e659a01
Add italian translations
Nov 7, 2024
dc6df67
Update accreditation.py
Nov 8, 2024
44ea3db
Update _trial_temp.lock and accreditation.py
Nov 8, 2024
2e49917
Accreditor can now update Org Info
Nov 8, 2024
1b4dd2c
add some translations
Nov 11, 2024
11e20a9
Update __init__.py, config.py, and 2 more files...
Nov 11, 2024
f08622c
Update __init__.py and _trial_temp.lock
Nov 11, 2024
af8fccc
max comments in preferences
Nov 11, 2024
72bd264
Merge branch 'devel' of https://gitlab.anticorruzione.it/servizi-inte…
Nov 11, 2024
19bb06c
Update __init__.py and _trial_temp.lock
Nov 11, 2024
2e39fc1
Update __init__.py
Nov 11, 2024
cfd58a1
Update requests.py
Nov 12, 2024
55b8719
Update config_desc.py
Nov 12, 2024
bbf69ca
add flag multitenant ed enable/disable EO forwarding
Nov 12, 2024
c5d0a0a
Update __init__.py
Nov 12, 2024
e5eae06
Refactoring OE to EO
Nov 12, 2024
6d412d4
Update __init__.py
Nov 12, 2024
3f8032a
fix internationalization
Nov 12, 2024
38f9612
fix legend label chart on report
Nov 12, 2024
4e092f8
Updated test db
Nov 13, 2024
90c93ea
Updated .github
Nov 13, 2024
72110d1
Updated test db
Nov 13, 2024
81b0c24
Fix label on report and format date
Nov 13, 2024
34b693b
Update globaleaks-69.db and helpers.py
Nov 13, 2024
b99f2e4
Update user.py, test_user.py, and helpers.py
Nov 13, 2024
044a5e8
Update helpers.py
Nov 13, 2024
0d8b773
Update helpers.py
Nov 13, 2024
e825c1c
Added audit log on whistleblower download file
Nov 13, 2024
56e81fc
Update globaleaks-69.db
Nov 13, 2024
c27a529
Update rtip.py
Nov 13, 2024
2e6112f
Merge branch 'devel' of https://e.bosu:[email protected]
Nov 13, 2024
288be68
preference resolver for accreditor
Nov 13, 2024
bb24cb2
Merge branch 'devel' of https://gitlab.anticorruzione.it/servizi-inte…
Nov 13, 2024
3f27284
Update test_api.py
Nov 13, 2024
8393ef8
Update test_rtip.py
Nov 13, 2024
aca1778
Fix disabled fiscal code on invited EO accreditation
Nov 13, 2024
19632c9
Update rtip.py and wbtip.py
Nov 13, 2024
9913112
Update test_rfile.py
Nov 13, 2024
d7febf6
fix for maximum number of fields
Nov 14, 2024
51d2d59
Update test_rfile.py
Nov 14, 2024
3d703a8
Merge branch 'devel' of https://e.bosu:[email protected]
Nov 14, 2024
c525907
cypress - configure user test
Nov 14, 2024
27ee7f1
cypress - add new accreditor
Nov 14, 2024
700dba0
cypress - users login
Nov 14, 2024
1eaa3b9
Update rtip.py
Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@evilaliv3
* @globaleaks/maintainers
39 changes: 39 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
open-pull-requests-limit: 0
schedule:
interval: daily

- package-ecosystem: pip
directory: /backend
open-pull-requests-limit: 0
schedule:
interval: daily

- package-ecosystem: pip
directory: backend/requirements
schedule:
interval: "monthly"
labels: [ ]
ignore:
- dependency-name: "*"

- package-ecosystem: npm
directory: /client
open-pull-requests-limit: 0
schedule:
interval: daily

- package-ecosystem: docker
directory: /docker
open-pull-requests-limit: 0
schedule:
interval: daily

- package-ecosystem: pip
directory: /documentation
open-pull-requests-limit: 0
schedule:
interval: daily
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ name: Build

on: [ push, pull_request ]

# Declare default permissions as read only.
permissions: read-all

jobs:
run_build:
runs-on: "ubuntu-latest"
steps:
- name: Check out repository code
uses: actions/[email protected]
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1

Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
push:
branches: [ "stable", "devel" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "stable" ]
schedule:
- cron: '33 6 * * 2'

# Declare default permissions as read only.
permissions: read-all

jobs:
codacy-security-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: results.sarif
86 changes: 86 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: "CodeQL"

on:
push:
branches: [ "stable"]
pull_request:
branches: [ "stable", "devel"]
schedule:
- cron: '15 14 * * 6'

# Declare default permissions as read only.
permissions: read-all

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
category: "/language:${{matrix.language}}"
73 changes: 73 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/stable/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/stable/docs/checks.md#maintained
schedule:
- cron: '33 21 * * 4'
push:
branches: [ "stable" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/scripts/build_and_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
echo "Running Build & Install"
distro="$(lsb_release -cs)"

cd /build/whistleblowing-software
cd /build/globaleaks-whistleblowing-software

sudo apt-get -y update

Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/scripts/run-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

set -e

LOGFILE="/var/globaleaks/log/globaleaks.log"
ACCESSLOG="/var/globaleaks/log/access.log"

function atexit {
if [[ -f $LOGFILE ]]; then
cat $LOGFILE
fi

if [[ -f $ACCESSLOG ]]; then
cat $ACCESSLOG
fi
}

trap atexit EXIT

sudo apt-get install -y debootstrap

export chroot="/tmp/globaleaks_chroot/"
Expand All @@ -38,4 +23,4 @@ sudo -E chroot "$chroot" locale-gen
sudo -E chroot "$chroot" useradd -m builduser
sudo -E su -c 'echo "builduser ALL=NOPASSWD: ALL" >> "$chroot"/etc/sudoers'
sudo -E chroot "$chroot" chown builduser -R /build
sudo -E chroot "$chroot" su - builduser /bin/bash -c '/build/whistleblowing-software/.github/workflows/scripts/build_and_install.sh'
sudo -E chroot "$chroot" su - builduser /bin/bash -c '/build/globaleaks-whistleblowing-software/.github/workflows/scripts/build_and_install.sh'
15 changes: 0 additions & 15 deletions .github/workflows/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

set -e

LOGFILE="$GITHUB_WORKSPACE/backend/workingdir/log/globaleaks.log"
ACCESSLOG="$GITHUB_WORKSPACE/backend/workingdir/log/access.log"

function atexit {
if [[ -f $LOGFILE ]]; then
cat $LOGFILE
fi

if [[ -f $ACCESSLOG ]]; then
cat $ACCESSLOG
fi
}

trap atexit EXIT

setupClient() {
cd $GITHUB_WORKSPACE/client # to install frontend dependencies
npm install -d
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Test

on: [ push, pull_request ]

# Declare default permissions as read only.
permissions: read-all

env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

Expand All @@ -10,7 +13,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: Check out repository code
uses: actions/[email protected]
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1

Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ backend/workingdir/
client/build
client/node_modules/
documentation/_build
/docker-compose.yml
/Dockerfile
/**/client/package.json
/**/client/proxy.conf.json
/client/.angular
.scannerwork/
.vscode/
backend/__pycache__/
2 changes: 1 addition & 1 deletion backend/globaleaks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__version__ = '5.0.10'
__license__ = 'AGPL-3.0'

DATABASE_VERSION = 68
DATABASE_VERSION = 69
FIRST_DATABASE_VERSION_SUPPORTED = 52

# Add new languages as they are supported here! To do this retrieve the name of
Expand Down
Loading
Loading