From c8de3ebf2b8e75b85164d0f5d53af78a67548dd1 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Tue, 20 Sep 2022 17:48:46 +0000 Subject: [PATCH 1/6] fix codeql python flow --- .github/workflows/codeql-analysis.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ab2b4a78..582eae0f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -52,8 +52,8 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # - name: Autobuild + # uses: github/codeql-action/autobuild@v2 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -62,9 +62,10 @@ jobs: # and modify them (or add more) to build your code if your project # uses a compiled language - #- run: | - # make bootstrap - # make release + - run: | + python3 -m venv venv + source venv/bin/activate + pip install -r requirements.txt - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 16b114c42798fc021a527eba41ace39ffcb3e807 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Wed, 19 Oct 2022 12:48:46 +0000 Subject: [PATCH 2/6] try fix codeql No event triggers defined in `on` --- .github/workflows/codeql-analysis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 582eae0f..9e592adf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,14 +11,7 @@ # name: "CodeQL" -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '37 18 * * 5' +on: [push] jobs: analyze: From 8b7d7d5f7c425ad1415b45a172919f172c18c10a Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Tue, 18 Jul 2023 19:40:45 +0000 Subject: [PATCH 3/6] bump version --- src/Config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Config.py b/src/Config.py index f19b9bbe..9f5de779 100644 --- a/src/Config.py +++ b/src/Config.py @@ -184,10 +184,10 @@ trackers = [ class Config(object): def __init__(self, argv): - self.version = "0.7.9" + self.version = "0.7.9+" self.user_agent = "conservancy" # DEPRECATED ; replace with git-generated commit - self.rev = 5100 + self.rev = 5110 self.user_agent_rev = 8192 self.argv = argv self.action = None From 3dc22837184a33ff874eea79f9dab14ed7bdbb26 Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Tue, 18 Jul 2023 19:41:22 +0000 Subject: [PATCH 4/6] allow setting permission_rules to null to forbid everything --- src/Content/ContentManager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 350370d0..bcf96c0b 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -514,6 +514,11 @@ class ContentManager(object): for permission_pattern, permission_rules in list(user_contents["permission_rules"].items()): # Regexp rules if not SafeRe.match(permission_pattern, user_urn): continue # Rule is not valid for user + if permission_rules is None: + self.log.info(f'Permission rule for {permission_pattern} is null, ' + 'we set max_size[_optional] to zero. ' + 'NOTE: This is not supported by <0.7.10') + permission_rules = {'max_size': 0, 'max_size_optional': 0} # Update rules if its better than current recorded ones for key, val in permission_rules.items(): if key not in rules: From 32e8f70878713d886772d64fad5aa431cd53314e Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Tue, 18 Jul 2023 20:21:57 +0000 Subject: [PATCH 5/6] fix workflow file --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b80bff1..67e067fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,7 @@ name: tests -on: [] +on: + workflow_dispatch: jobs: test: From b7e3f10a85771da040f6b142b34e95950cce9bce Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Thu, 20 Jul 2023 03:37:18 +0000 Subject: [PATCH 6/6] allow manual codeql dispatch --- .github/workflows/codeql-analysis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9e592adf..f467e83d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,7 +11,9 @@ # name: "CodeQL" -on: [push] +on: + push: + workflow_dispatch: jobs: analyze: