Tomas Kopecek
ba2e1e520b
basic security checks with bandit
...
Fixes: https://pagure.io/koji/issue/3042
2021-10-20 15:20:14 +02:00
Tomas Kopecek
73399e517c
kojivmd: py3 compatibility issues
...
Fixes: https://pagure.io/koji/issue/3059
2021-09-30 12:39:23 +02:00
Yu Ming Zhu
0489ad7187
kojivmd: change opts allowed_scms_by_* to allowed_scms_use_*
...
fixes : #3049
2021-09-29 09:19:36 +02:00
Yu Ming Zhu
a3f19e0f12
more reasonable parameter name, and more doc strs
2021-08-16 17:55:26 +00:00
Yu Ming Zhu
47c4b5d70b
kojid: extend SCM.assert_allowed with hub policy
...
This is a simple extention of `SCM.assert_allowed`
- `assert_allowed_by_policy` will set the default "use_common" to False which is different to the old behavior
- `channel`, `user_id`, `scratch` are passed in the `policy_data` with scminfo right now.
This is a prototype for this change, and there are some other solutions could be implemented too
- Use a scmpolicy plugin as `postSCMCheckout` callback, the pro is that we can do more checks after the source is initialized on builder, meanwhile, the con is that the source will be downloaded even it is denied by policy. It might be a potential risk?
- Do the scm check in hub's `make_task`, this looks straightforward, but may lack some builder's information
fixes : #2757
2021-08-16 17:55:26 +00:00
Tomas Kopecek
96ae0ecef5
explicit encoding for text file operations
...
Fixes: https://pagure.io/koji/issue/2641
2021-01-26 13:36:25 +01:00
Tomas Kopecek
883f34cde4
kojivmd: fix typo
...
Fixes: https://pagure.io/koji/issue/2625
2021-01-06 17:02:35 +01:00
Tomas Kopecek
0f56d39487
remove deprecated --ca option
...
Fixes: https://pagure.io/koji/issue/2192
2020-11-23 11:03:38 +01:00
Tomas Kopecek
5a4efd6d07
fix merge problems
2020-10-06 15:10:22 +02:00
Tomas Kopecek
48434f4393
vm in py3
2020-10-06 15:00:23 +02:00
Tomas Kopecek
f06a8c0bca
fix flake8 errors
2020-08-25 13:05:02 +02:00
Tomas Kopecek
f8419e3626
remove deprecated krbV support
...
Fixes: https://pagure.io/koji/issue/1991
2020-07-24 15:08:47 -04:00
Tomas Kopecek
bb0ea0d6d5
vm: clone mac address via xml
...
Fixes: https://pagure.io/koji/issue/2289
2020-06-24 14:43:17 +02:00
Yuming Zhu
65f5b6489b
fix param name for uploadFile
2020-06-24 14:42:01 +02:00
Tomas Kopecek
50bcb6f3bc
replace md5 with sha256
2020-06-24 14:42:01 +02:00
Yu Ming Zhu
a893e8bf2b
a wrapper ignoring FIPS for hashlib.md5
2020-06-24 14:42:00 +02:00
Tomas Kopecek
0132313f92
replace logging.warn with warning
...
call is deprected in python 3.7
Fixes: https://pagure.io/koji/issue/2135
2020-04-22 13:47:15 +02:00
Yuming Zhu
cf34706f04
use Exception instead of BaseException for bare expection
2020-03-03 21:38:22 +08:00
Yuming Zhu
2a2c5cb729
flake8: apply W rules (prefering W503)
2020-03-03 21:38:22 +08:00
Yuming Zhu
c5db34a8e1
flake8: apply E501 with max-line-length=99
2020-03-03 21:38:22 +08:00
Yuming Zhu
f1ba6cefd7
flake8: apply all rest E7 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
6dd77e0fa4
flake8: apply E502 rule
2020-03-03 21:38:22 +08:00
Yuming Zhu
0f727a2ab4
flake8: apply E3 rules
2020-03-03 21:38:22 +08:00
Yuming Zhu
05340b146b
flake8: apply E2 rules except E266
2020-03-03 21:38:21 +08:00
Yuming Zhu
ce1f9928af
flake8: apply E1 rules
2020-03-03 21:38:21 +08:00
Yu Ming Zhu
49504073b1
refine import style
2020-03-03 21:35:08 +08:00
Yuming Zhu
97cfaa4fcf
flake8: follow E265 rule
2020-03-03 21:35:08 +08:00
Yuming Zhu
642508ccf6
flake8: follow all F rules
2020-03-03 21:35:08 +08:00
Tomas Kopecek
638f6cc6f2
replace xmlrpc_client exception with requests
...
It is broken in startup function for kojid and kojivmd from the
introduction of requests.
Fixes: https://pagure.io/koji/issue/1914
2020-02-21 12:40:42 +01:00
Tomas Kopecek
0e5042832d
split admin_emails option in koji.add_mail_logger
...
If there are multiple e-mailes separated by comma of space, they should
be split for correct usage of smtplib.sendmail.
Fixes: https://pagure.io/koji/issue/1240
2019-12-19 10:31:58 +01:00
Yu Ming Zhu
5b83c682e4
remove unused imports
2019-12-12 11:00:58 +00:00
Yu Ming Zhu
77bc43c07a
sort imports in vm
2019-12-12 11:00:56 +00:00
Tomas Kopecek
98b83eff69
fix downloads w/o content-length
...
Fixes: https://pagure.io/koji/issue/982
2019-11-25 14:51:08 +01:00
Yu Ming Zhu
4c1928f377
extract read_config_files util for config parsing
2019-10-15 09:14:16 +02:00
Tomas Kopecek
46f85c9b86
verifyChecksum fails for non-output files
...
PR #967 introduced another error. Before verifyChecksum was used only
from kojikamid and it made sense, that it failed on other files. Now it
is used also for build requires, etc. As it makes no harm (read-only),
we can extend this check for other paths.
Fixes: https://pagure.io/koji/issue/1669
2019-10-15 09:10:10 +02:00
Yu Ming Zhu
2034695e88
add an option to set server realm for all clients
2019-10-10 16:37:56 +02:00
Tomas Kopecek
63648170df
Fix typo preventing vm builds
...
Bug introduced in PR #967 prevents vm builds to work. There is an
additional option to method verifyChecksum.
Fixes: https://pagure.io/koji/issue/1665
2019-10-09 09:15:14 +02:00
Mike McLean
daa58d4f9d
kojivmd, too
2019-02-21 11:22:34 -05:00
Mike McLean
4fa2901720
cleanup
...
unused var
whitespace
missing import
2019-01-15 10:51:19 -05:00
Tomas Kopecek
4191840bd7
check_sigmd5 for kojivmd
2019-01-15 10:51:19 -05:00
Tomas Kopecek
28ce53afc3
use correct fileinfo checksum field
...
Fixes: https://pagure.io/koji/issue/966
2019-01-15 10:51:19 -05:00
Tomas Kopecek
6f7f828f77
python-modernize -f lib2to3.fixes.fix_except
2018-07-11 17:37:40 -04:00
Tomas Kopecek
caae1a0a8b
workaround unnecessary list conversions
2018-07-11 17:37:40 -04:00
Tomas Kopecek
8e61dc7c56
python-modernize -f libmodernize.fixes.fix_classic_division
2018-07-11 17:37:40 -04:00
Tomas Kopecek
be535c2854
python-modernize -f libmodernize.fixes.fix_imports_six
2018-07-11 17:37:39 -04:00
Tomas Kopecek
d92fa1fa9c
python-modernize -f libmodernize.fixes.fix_file
2018-07-11 17:37:39 -04:00
Tomas Kopecek
7f6b717eb6
python-modernize -f libmodernize.fixes.fix_import
2018-07-11 17:37:39 -04:00
Tomas Kopecek
bcee24e50c
python-modernize -f libmodernize.fixes.fix_dict_six
2018-07-11 17:37:39 -04:00
Franz Chih-Ping Hsieh
f356ac4f17
force using python2 to run script
...
Fixes #945
2018-05-24 00:01:30 -04:00
Mike McLean
4c07073403
simplify check for krbV module
2018-04-02 16:38:27 -04:00