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

v3.7.0 - More customisation options #2875

Merged
merged 102 commits into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
62a30dd
Botched multiple config handler
Jul 2, 2020
baff27e
Unbotched support for multiple instances using config folders
Jul 2, 2020
9569e15
Fix black from CI
fourjr Jul 3, 2020
ee7d236
oops
fourjr Jul 3, 2020
d74f8c8
black?
fourjr Jul 3, 2020
e65997a
Improve plugin install error messages
fourjr Nov 1, 2020
39e3bc3
Changelog
fourjr Nov 1, 2020
c605d68
Force push to dev
fourjr Nov 1, 2020
2e3def8
Merge
fourjr Nov 1, 2020
3cfba28
Plain replies (#2872)
fourjr Nov 4, 2020
feebbef
React to start thread
fourjr Nov 4, 2020
edd3736
Add config to mention mods after move , resolve #215
fourjr Nov 4, 2020
306a158
transfer reactions config var, resolve #2783
fourjr Nov 4, 2020
d0bcaf1
close_on_leave config, resolves #2757
fourjr Nov 4, 2020
90e11ca
Formatting
fourjr Nov 4, 2020
9f8d874
Added alert_on_mention, resolve #2833
fourjr Nov 5, 2020
5cb85a2
Added confirm thread creation, resolve #2773
fourjr Nov 5, 2020
3eee193
Support gyazo links in image embed, resolve #282
fourjr Nov 5, 2020
1968f0a
Support silent arg in contact
fourjr Nov 5, 2020
59eabf8
Help and help all, resolve #2847
fourjr Nov 5, 2020
e7ba21b
Role blocking, resolve #2753
fourjr Nov 5, 2020
ef4abaf
Add functionality to unblock roles
fourjr Nov 5, 2020
66856ca
cooldown_thread_title and cooldown_thread_response config var, resolv…
fourjr Nov 5, 2020
06a0a87
Add ?selfcontact resolves #2762
fourjr Nov 5, 2020
8da1e20
Fix bugs introduced in -dev3
fourjr Nov 5, 2020
5dea0bd
More elegant solution for unseenformatter
fourjr Nov 5, 2020
91153d3
Fix errors in -v3/4
fourjr Nov 5, 2020
55bf442
up version in changelog
fourjr Nov 5, 2020
3657ad1
Close on thread reason config var-dev6
fourjr Nov 6, 2020
2aca7ff
Custom dpy version with stickers, support stickers/pins
fourjr Nov 6, 2020
2479558
Bump version
fourjr Nov 6, 2020
edd7ef2
Clearer error messages for plain messages edit/del
fourjr Nov 6, 2020
d294d08
Update modmail.py
lorenzo132 Nov 6, 2020
cf52d38
Merge pull request #2877 from lorenzo132/patch-2
fourjr Nov 6, 2020
305196b
Add support for thread titles, resolve #2838
fourjr Nov 7, 2020
058b315
Merge branch 'development' of https://github.com/kyb3r/modmail into d…
fourjr Nov 7, 2020
4350213
im scared to lose my work :|
RealCyGuy Nov 8, 2020
c7f6d53
Privacy policy/data_collection config-dev9
fourjr Nov 8, 2020
4af8dde
add check for title
fourjr Nov 8, 2020
4bd61ad
pin ?title message
fourjr Nov 8, 2020
2da6fdd
Set docstring for title
fourjr Nov 8, 2020
96effc2
Merge pull request #1 from kyb3r/development
RealCyGuy Nov 10, 2020
d647edb
`?move` now does not require exact category names, accepts case-insen…
fourjr Nov 10, 2020
69d60ab
Fix issue with updateperms not casting to str, resolve #2856
fourjr Nov 10, 2020
27afe7d
Added `?autotrigger` to specify keywords to trigger commands, resolve…
fourjr Nov 10, 2020
a7c2387
More elegant solution to dummymessage
fourjr Nov 10, 2020
56bc212
Fix bug with data collection
fourjr Nov 10, 2020
5c8ee8d
Specify exact versions pipfile
fourjr Nov 10, 2020
038fc61
Fix bugs with alias and autotrigger, resolve #2870
fourjr Nov 10, 2020
1b5d993
Use enums in config, resolve #2821
fourjr Nov 10, 2020
3428eb3
use regex autotrigger config
fourjr Nov 10, 2020
71c27a2
bugfixing
fourjr Nov 10, 2020
579dbd4
Fix requirements again
fourjr Nov 10, 2020
22689a7
Test deps
fourjr Nov 10, 2020
86f51b2
Test deps
fourjr Nov 10, 2020
84924a6
TEST DEPS
fourjr Nov 10, 2020
e17c2c9
TEST DEPS
fourjr Nov 10, 2020
2dfe72a
TEST DEPS
fourjr Nov 10, 2020
1a3b39d
Final fix for deps?
fourjr Nov 10, 2020
82d925e
Bump version to dev12
fourjr Nov 10, 2020
ff9888b
Create and delete persistent notes
RealCyGuy Nov 10, 2020
5ed923a
Merge branch 'development' into development
fourjr Nov 10, 2020
c097db9
move api.delete_note to the right place
RealCyGuy Nov 11, 2020
55281cc
add to tasks
RealCyGuy Nov 11, 2020
18bcb9e
edit persistent notes
RealCyGuy Nov 11, 2020
18d3b4b
format
RealCyGuy Nov 11, 2020
8e4f8d6
changelog and version bump
RealCyGuy Nov 11, 2020
2ea4b36
Fix bugs with autotriggers
fourjr Nov 11, 2020
9920b0d
Add git links to changelog
fourjr Nov 11, 2020
da09dab
Update reaadme links
fourjr Nov 11, 2020
5a05869
Add a bunch of new events, fix plugin ready
fourjr Nov 11, 2020
5d62d27
Push version
fourjr Nov 11, 2020
2d56745
Fix CI
fourjr Nov 11, 2020
9715586
Fix CI
fourjr Nov 11, 2020
615bad0
bugfix
fourjr Nov 11, 2020
fedbca8
Lint
fourjr Nov 11, 2020
b80c008
lint
fourjr Nov 11, 2020
09e5929
lint
fourjr Nov 11, 2020
bfb1a17
bugfixing
fourjr Nov 11, 2020
c04f0e0
Add 10min cooldown to title
fourjr Nov 12, 2020
cdad320
bugfix
fourjr Nov 12, 2020
60ac027
bugfix
fourjr Nov 12, 2020
29747b7
lint
fourjr Nov 12, 2020
a84cb9c
Autoupdate functions
fourjr Nov 12, 2020
90d78cf
Fix a bug in update related commands
fourjr Nov 12, 2020
07e51b4
Use asyncio subprocess
fourjr Nov 12, 2020
e7c479c
bump version & update baseline
fourjr Nov 12, 2020
abff685
Fix issues with update
fourjr Nov 12, 2020
342dc20
Bump version
fourjr Nov 12, 2020
a6eef11
Support heroku in prerelease update
fourjr Nov 12, 2020
1ae3cf6
Hotfix heroku logging
fourjr Nov 12, 2020
5649659
Failsafe for long changelogs
fourjr Nov 12, 2020
bd18770
Tese
fourjr Nov 12, 2020
eddee03
Test
fourjr Nov 12, 2020
37edddc
test again
fourjr Nov 12, 2020
4afc8d0
Fixes
fourjr Nov 12, 2020
e6ebf91
test again
fourjr Nov 12, 2020
c5f999f
Remove debug notes
fourjr Nov 12, 2020
02465e7
Linting
fourjr Nov 12, 2020
771ff96
Cleanup and add to app.json
fourjr Nov 13, 2020
97bfacc
fix bug
fourjr Nov 13, 2020
9497f17
Cleanup
fourjr Nov 13, 2020
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
170 changes: 104 additions & 66 deletions .bandit_baseline.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
{
"errors": [],
"generated_at": "2019-10-07T08:19:22Z",
"generated_at": "2020-11-12T15:17:38Z",
"metrics": {
"./bot.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.HIGH": 1.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
"CONFIDENCE.UNDEFINED": 0.0,
"SEVERITY.HIGH": 0.0,
"SEVERITY.LOW": 0.0,
"SEVERITY.LOW": 1.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 933,
"nosec": 0
},
"_totals": {
"CONFIDENCE.HIGH": 2.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 1.0,
"CONFIDENCE.UNDEFINED": 0.0,
"SEVERITY.HIGH": 0.0,
"SEVERITY.LOW": 2.0,
"SEVERITY.MEDIUM": 1.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 7299,
"loc": 1264,
"nosec": 0
},
"cogs/modmail.py": {
"./cogs/modmail.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -35,10 +23,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 973,
"loc": 1280,
"nosec": 0
},
"cogs/plugins.py": {
"./cogs/plugins.py": {
"CONFIDENCE.HIGH": 1.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -47,22 +35,22 @@
"SEVERITY.LOW": 1.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 537,
"loc": 572,
"nosec": 0
},
"cogs/utility.py": {
"CONFIDENCE.HIGH": 1.0,
"./cogs/utility.py": {
"CONFIDENCE.HIGH": 2.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
"CONFIDENCE.UNDEFINED": 0.0,
"SEVERITY.HIGH": 0.0,
"SEVERITY.LOW": 0.0,
"SEVERITY.LOW": 1.0,
"SEVERITY.MEDIUM": 1.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 1587,
"loc": 1710,
"nosec": 0
},
"core/_color_data.py": {
"./core/_color_data.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -71,10 +59,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 1168,
"loc": 1166,
"nosec": 0
},
"core/changelog.py": {
"./core/changelog.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -83,10 +71,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 154,
"loc": 145,
"nosec": 0
},
"core/checks.py": {
"./core/checks.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -95,10 +83,22 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 75,
"loc": 89,
"nosec": 0
},
"./core/clients.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 1.0,
"CONFIDENCE.UNDEFINED": 0.0,
"SEVERITY.HIGH": 0.0,
"SEVERITY.LOW": 1.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 585,
"nosec": 0
},
"core/clients.py": {
"./core/config.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -107,10 +107,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 200,
"loc": 327,
"nosec": 0
},
"core/config.py": {
"./core/decorators.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -119,10 +119,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 276,
"loc": 9,
"nosec": 0
},
"core/decorators.py": {
"./core/models.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -131,10 +131,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 7,
"loc": 199,
"nosec": 0
},
"core/models.py": {
"./core/paginator.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -143,10 +143,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 91,
"loc": 209,
"nosec": 0
},
"core/paginator.py": {
"./core/thread.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -155,10 +155,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 214,
"loc": 993,
"nosec": 0
},
"core/thread.py": {
"./core/time.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -167,10 +167,10 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 716,
"loc": 158,
"nosec": 0
},
"core/time.py": {
"./core/utils.py": {
"CONFIDENCE.HIGH": 0.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 0.0,
Expand All @@ -179,65 +179,103 @@
"SEVERITY.LOW": 0.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 169,
"loc": 283,
"nosec": 0
},
"core/utils.py": {
"CONFIDENCE.HIGH": 0.0,
"_totals": {
"CONFIDENCE.HIGH": 4.0,
"CONFIDENCE.LOW": 0.0,
"CONFIDENCE.MEDIUM": 1.0,
"CONFIDENCE.UNDEFINED": 0.0,
"SEVERITY.HIGH": 0.0,
"SEVERITY.LOW": 1.0,
"SEVERITY.MEDIUM": 0.0,
"SEVERITY.LOW": 4.0,
"SEVERITY.MEDIUM": 1.0,
"SEVERITY.UNDEFINED": 0.0,
"loc": 199,
"loc": 8989,
"nosec": 0
}
},
"results": [
{
"code": "14 from site import USER_SITE\n15 from subprocess import PIPE\n16 \n17 import discord\n",
"filename": "cogs/plugins.py",
"code": "11 from datetime import datetime\n12 from subprocess import PIPE\n13 from types import SimpleNamespace\n",
"filename": "./bot.py",
"issue_confidence": "HIGH",
"issue_severity": "LOW",
"issue_text": "Consider possible security implications associated with PIPE module.",
"line_number": 12,
"line_range": [
12
],
"more_info": "https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess",
"test_id": "B404",
"test_name": "blacklist"
},
{
"code": "13 from site import USER_SITE\n14 from subprocess import PIPE\n15 \n16 import discord\n",
"filename": "./cogs/plugins.py",
"issue_confidence": "HIGH",
"issue_severity": "LOW",
"issue_text": "Consider possible security implications associated with PIPE module.",
"line_number": 14,
"line_range": [
14,
15
],
"more_info": "https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess",
"test_id": "B404",
"test_name": "blacklist"
},
{
"code": "12 from json import JSONDecodeError, loads\n13 from subprocess import PIPE\n14 from textwrap import indent\n",
"filename": "./cogs/utility.py",
"issue_confidence": "HIGH",
"issue_severity": "LOW",
"issue_text": "Consider possible security implications associated with PIPE module.",
"line_number": 15,
"line_number": 13,
"line_range": [
15,
16
13
],
"more_info": "https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess",
"test_id": "B404",
"test_name": "blacklist"
},
{
"code": "1824 try:\n1825 exec(to_compile, env) # pylint: disable=exec-used\n1826 except Exception as exc:\n",
"filename": "cogs/utility.py",
"code": "1985 try:\n1986 exec(to_compile, env) # pylint: disable=exec-used\n1987 except Exception as exc:\n",
"filename": "./cogs/utility.py",
"issue_confidence": "HIGH",
"issue_severity": "MEDIUM",
"issue_text": "Use of exec detected.",
"line_number": 1825,
"line_number": 1986,
"line_range": [
1825
1986
],
"more_info": "https://bandit.readthedocs.io/en/latest/plugins/b102_exec_used.html",
"test_id": "B102",
"test_name": "exec_used"
},
{
"code": "219 for token in shlex.shlex(alias, punctuation_chars=\"&\"):\n220 if token != \"&&\":\n221 buffer += \" \" + token\n",
"filename": "core/utils.py",
"code": "68 \n69 def __init__(self, bot, access_token: str = \"\", username: str = \"\", **kwargs):\n70 self.bot = bot\n71 self.session = bot.session\n72 self.headers: dict = None\n73 self.access_token = access_token\n74 self.username = username\n75 self.avatar_url: str = kwargs.pop(\"avatar_url\", \"\")\n76 self.url: str = kwargs.pop(\"url\", \"\")\n77 if self.access_token:\n78 self.headers = {\"Authorization\": \"token \" + str(access_token)}\n79 \n80 async def request(\n",
"filename": "./core/clients.py",
"issue_confidence": "MEDIUM",
"issue_severity": "LOW",
"issue_text": "Possible hardcoded password: '&&'",
"line_number": 220,
"issue_text": "Possible hardcoded password: ''",
"line_number": 69,
"line_range": [
220
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79
],
"more_info": "https://bandit.readthedocs.io/en/latest/plugins/b105_hardcoded_password_string.html",
"test_id": "B105",
"test_name": "hardcoded_password_string"
"more_info": "https://bandit.readthedocs.io/en/latest/plugins/b107_hardcoded_password_default.html",
"test_id": "B107",
"test_name": "hardcoded_password_default"
}
]
}
8 changes: 4 additions & 4 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install bandit pylint black
python -m pip install bandit==1.6.2 pylint black==19.10b0
continue-on-error: true
- name: Bandit syntax check
run: bandit ./bot.py cogs/*.py core/*.py -b .bandit_baseline.json
run: bandit -r . -b .bandit_baseline.json
- name: Pylint
run: pylint ./bot.py cogs/*.py core/*.py --disable=import-error --exit-zero -r y
continue-on-error: true
- name: Black and flake8
- name: Black
run: |
black . --diff
black . --diff --check
Loading