1921 "PEP8/InsecureHashes", |
1921 "PEP8/InsecureHashes", |
1922 defaultParameters["SecurityChecker"]["InsecureHashes"], |
1922 defaultParameters["SecurityChecker"]["InsecureHashes"], |
1923 ) |
1923 ) |
1924 ) |
1924 ) |
1925 ) |
1925 ) |
1926 ), |
1926 ) |
1927 self.insecureSslProtocolsEdit.setPlainText( |
1927 self.insecureSslProtocolsEdit.setPlainText( |
1928 "\n".join( |
1928 "\n".join( |
1929 Preferences.toList( |
1929 Preferences.toList( |
1930 settings.value( |
1930 settings.value( |
1931 "PEP8/InsecureSslProtocolVersions", |
1931 "PEP8/InsecureSslProtocolVersions", |
1945 self.dsaMediumRiskCombo.setCurrentText( |
1945 self.dsaMediumRiskCombo.setCurrentText( |
1946 settings.value( |
1946 settings.value( |
1947 "PEP8/WeakKeySizeDsaMedium", |
1947 "PEP8/WeakKeySizeDsaMedium", |
1948 defaultParameters["SecurityChecker"]["WeakKeySizeDsaMedium"], |
1948 defaultParameters["SecurityChecker"]["WeakKeySizeDsaMedium"], |
1949 ) |
1949 ) |
1950 ), |
1950 ) |
1951 self.rsaHighRiskCombo.setCurrentText( |
1951 self.rsaHighRiskCombo.setCurrentText( |
1952 settings.value( |
1952 settings.value( |
1953 "PEP8/WeakKeySizeRsaHigh", |
1953 "PEP8/WeakKeySizeRsaHigh", |
1954 defaultParameters["SecurityChecker"]["WeakKeySizeRsaHigh"], |
1954 defaultParameters["SecurityChecker"]["WeakKeySizeRsaHigh"], |
1955 ) |
1955 ) |
1956 ), |
1956 ) |
1957 self.rsaMediumRiskCombo.setCurrentText( |
1957 self.rsaMediumRiskCombo.setCurrentText( |
1958 settings.value( |
1958 settings.value( |
1959 "PEP8/WeakKeySizeRsaMedium", |
1959 "PEP8/WeakKeySizeRsaMedium", |
1960 defaultParameters["SecurityChecker"]["WeakKeySizeRsaMedium"], |
1960 defaultParameters["SecurityChecker"]["WeakKeySizeRsaMedium"], |
1961 ) |
1961 ) |
1962 ), |
1962 ) |
1963 self.ecHighRiskCombo.setCurrentText( |
1963 self.ecHighRiskCombo.setCurrentText( |
1964 settings.value( |
1964 settings.value( |
1965 "PEP8/WeakKeySizeEcHigh", |
1965 "PEP8/WeakKeySizeEcHigh", |
1966 defaultParameters["SecurityChecker"]["WeakKeySizeEcHigh"], |
1966 defaultParameters["SecurityChecker"]["WeakKeySizeEcHigh"], |
1967 ) |
1967 ) |
1968 ), |
1968 ) |
1969 self.ecMediumRiskCombo.setCurrentText( |
1969 self.ecMediumRiskCombo.setCurrentText( |
1970 settings.value( |
1970 settings.value( |
1971 "PEP8/WeakKeySizeEcMedium", |
1971 "PEP8/WeakKeySizeEcMedium", |
1972 defaultParameters["SecurityChecker"]["WeakKeySizeEcMedium"], |
1972 defaultParameters["SecurityChecker"]["WeakKeySizeEcMedium"], |
1973 ) |
1973 ) |
1974 ), |
1974 ) |
1975 self.typedExceptionsCheckBox.setChecked( |
1975 self.typedExceptionsCheckBox.setChecked( |
1976 Preferences.toBool( |
1976 Preferences.toBool( |
1977 settings.value( |
1977 settings.value( |
1978 "PEP8/CheckTypedException", |
1978 "PEP8/CheckTypedException", |
1979 defaultParameters["SecurityChecker"]["CheckTypedException"], |
1979 defaultParameters["SecurityChecker"]["CheckTypedException"], |
1980 ) |
1980 ) |
1981 ) |
1981 ) |
1982 ), |
1982 ) |
1983 |
1983 |
1984 # Imports Checker |
1984 # Imports Checker |
1985 self.appPackagesEdit.setPlainText( |
1985 self.appPackagesEdit.setPlainText( |
1986 " ".join( |
1986 " ".join( |
1987 sorted( |
1987 sorted( |
2247 |
2247 |
2248 # Security Checker |
2248 # Security Checker |
2249 settings.setValue( |
2249 settings.setValue( |
2250 "PEP8/HardcodedTmpDirectories", |
2250 "PEP8/HardcodedTmpDirectories", |
2251 [t.strip() for t in self.tmpDirectoriesEdit.toPlainText().splitlines()], |
2251 [t.strip() for t in self.tmpDirectoriesEdit.toPlainText().splitlines()], |
2252 ), |
2252 ) |
2253 settings.setValue( |
2253 settings.setValue( |
2254 "PEP8/InsecureHashes", |
2254 "PEP8/InsecureHashes", |
2255 [h.strip() for h in self.hashesEdit.text().split(",")], |
2255 [h.strip() for h in self.hashesEdit.text().split(",")], |
2256 ), |
2256 ) |
2257 settings.setValue( |
2257 settings.setValue( |
2258 "PEP8/InsecureSslProtocolVersions", |
2258 "PEP8/InsecureSslProtocolVersions", |
2259 [ |
2259 [ |
2260 p.strip() |
2260 p.strip() |
2261 for p in self.insecureSslProtocolsEdit.toPlainText().splitlines() |
2261 for p in self.insecureSslProtocolsEdit.toPlainText().splitlines() |
2262 ], |
2262 ], |
2263 ), |
2263 ) |
2264 settings.setValue( |
2264 settings.setValue( |
2265 "PEP8/WeakKeySizeDsaHigh", self.dsaHighRiskCombo.currentText() |
2265 "PEP8/WeakKeySizeDsaHigh", self.dsaHighRiskCombo.currentText() |
2266 ), |
2266 ) |
2267 settings.setValue( |
2267 settings.setValue( |
2268 "PEP8/WeakKeySizeDsaMedium", self.dsaMediumRiskCombo.currentText() |
2268 "PEP8/WeakKeySizeDsaMedium", self.dsaMediumRiskCombo.currentText() |
2269 ), |
2269 ) |
2270 settings.setValue( |
2270 settings.setValue( |
2271 "PEP8/WeakKeySizeRsaHigh", self.rsaHighRiskCombo.currentText() |
2271 "PEP8/WeakKeySizeRsaHigh", self.rsaHighRiskCombo.currentText() |
2272 ), |
2272 ) |
2273 settings.setValue( |
2273 settings.setValue( |
2274 "PEP8/WeakKeySizeRsaMedium", self.rsaMediumRiskCombo.currentText() |
2274 "PEP8/WeakKeySizeRsaMedium", self.rsaMediumRiskCombo.currentText() |
2275 ), |
2275 ) |
2276 settings.setValue("PEP8/WeakKeySizeEcHigh", self.ecHighRiskCombo.currentText()), |
2276 settings.setValue("PEP8/WeakKeySizeEcHigh", self.ecHighRiskCombo.currentText()) |
2277 settings.setValue( |
2277 settings.setValue( |
2278 "PEP8/WeakKeySizeEcMedium", self.ecMediumRiskCombo.currentText() |
2278 "PEP8/WeakKeySizeEcMedium", self.ecMediumRiskCombo.currentText() |
2279 ), |
2279 ) |
2280 settings.setValue( |
2280 settings.setValue( |
2281 "PEP8/CheckTypedException", self.typedExceptionsCheckBox.isChecked() |
2281 "PEP8/CheckTypedException", self.typedExceptionsCheckBox.isChecked() |
2282 ), |
2282 ) |
2283 |
2283 |
2284 # Imports Checker |
2284 # Imports Checker |
2285 settings.setValue( |
2285 settings.setValue( |
2286 "PEP8/ApplicationPackageNames", |
2286 "PEP8/ApplicationPackageNames", |
2287 sorted(self.appPackagesEdit.toPlainText().split()), |
2287 sorted(self.appPackagesEdit.toPlainText().split()), |