Changeset 3820756
- Timestamp:
- 11/24/2026 02:48:04 PM (less than one hour ago)
- Location:
- bastora-security-audit/trunk
- Files:
-
- 5 edited
-
bastora.php (modified) (2 diffs)
-
includes/class-asset-integrity.php (modified) (1 diff)
-
includes/class-content-scanner.php (modified) (6 diffs)
-
readme.txt (modified) (3 diffs)
-
sbom.json (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bastora-security-audit/trunk/bastora.php
r3818581 r3820756 4 4 * Plugin URI: https://www.bastora.de/ 5 5 * Description: 62-Punkte-Sicherheits-Check mit lokaler Firewall, Schadcode-Scanner, URL-Reputation, eigenem Captcha, Schwarm-Schutz und optionalem Passwort-Leak-Abgleich. Konfliktscheu gegenüber anderen Sicherheits-Plugins. 6 * Version: 2.3. 296 * Version: 2.3.30 7 7 * Requires at least: 6.0 8 8 * Requires PHP: 7.4 … … 22 22 } 23 23 24 define( 'BASTORA_VERSION', '2.3. 29' );24 define( 'BASTORA_VERSION', '2.3.30' ); 25 25 if ( ! defined( 'BASTORA_SUPPORT_BIS' ) ) { 26 26 define( 'BASTORA_SUPPORT_BIS', '2031-10' ); -
bastora-security-audit/trunk/includes/class-asset-integrity.php
r3758595 r3820756 1189 1189 } 1190 1190 1191 public static function plugin_datei_offiziell( $abs_path ) { 1192 $split = self::split_plugin_path( $abs_path ); 1193 if ( null === $split || '' === (string) $split['rel'] || ! get_option( 'bastora_external_calls_allowed', false ) ) { 1194 return false; 1195 } 1196 $version = self::installierte_plugin_version( $split['slug'] ); 1197 if ( '' === $version || ! is_file( $abs_path ) ) { 1198 return false; 1199 } 1200 $schluessel = 'bastora_pcs_' . md5( $split['slug'] . '|' . $version ); 1201 $dateien = get_transient( $schluessel ); 1202 if ( false === $dateien ) { 1203 $antwort = wp_remote_get( 'https://downloads.wordpress.org/plugin-checksums/' . rawurlencode( $split['slug'] ) . '/' . rawurlencode( $version ) . '.json', array( 'timeout' => 15 ) ); 1204 $j = ( ! is_wp_error( $antwort ) && 200 === (int) wp_remote_retrieve_response_code( $antwort ) ) ? json_decode( (string) wp_remote_retrieve_body( $antwort ), true ) : null; 1205 $dateien = ( is_array( $j ) && is_array( $j['files'] ?? null ) && (string) ( $j['version'] ?? '' ) === $version ) ? $j['files'] : array(); 1206 set_transient( $schluessel, $dateien, $dateien ? DAY_IN_SECONDS : HOUR_IN_SECONDS ); 1207 } 1208 $soll = is_array( $dateien ) && isset( $dateien[ $split['rel'] ]['sha256'] ) ? (array) $dateien[ $split['rel'] ]['sha256'] : array(); 1209 if ( ! $soll ) { 1210 return false; 1211 } 1212 $ist = (string) @hash_file( 'sha256', $abs_path ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 1213 foreach ( $soll as $s ) { 1214 if ( is_string( $s ) && 64 === strlen( $s ) && hash_equals( strtolower( $s ), $ist ) ) { 1215 return true; 1216 } 1217 } 1218 return false; 1219 } 1220 1191 1221 private static function installierte_plugin_version( $slug ) { 1192 1222 static $versionen = null; -
bastora-security-audit/trunk/includes/class-content-scanner.php
r3818581 r3820756 32 32 33 33 const ST_REMOVED = 'removed'; 34 const ST_ORIGINAL = 'original'; 34 35 35 36 const MAX_FILES_PER_RUN = 1500; … … 1690 1691 switch ( (string) $urteil['urteil'] ) { 1691 1692 case Bastora_Urteil::BELEGT: 1692 $status = self:: ST_ACTIVE;1693 $status = self::im_original( $scope, $file, $origin, $urteil ) ? self::ST_ORIGINAL : self::ST_ACTIVE; 1693 1694 break; 1694 1695 case Bastora_Urteil::ERKLAERT: … … 1700 1701 1701 1702 return array( $status, $origin, Bastora_Urteil::kurzform( $urteil ) ); 1703 } 1704 1705 private static function im_original( $scope, $file, $origin, array $urteil ) { 1706 if ( ! class_exists( 'Bastora_Asset_Integrity' ) || Bastora_Asset_Integrity::ORIGIN_ORIGINAL !== (string) $origin ) { 1707 return false; 1708 } 1709 if ( array( 'signatur' ) !== array_values( (array) ( $urteil['hart'] ?? array() ) ) ) { 1710 return false; 1711 } 1712 if ( true !== apply_filters( 'bastora_original_treffer_pruefen', false ) ) { 1713 return false; 1714 } 1715 if ( self::SCOPE_PLUGINS !== $scope ) { 1716 return false; 1717 } 1718 $groesse = is_file( $file ) ? (int) @filesize( $file ) : 0; // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 1719 if ( $groesse <= 0 || $groesse > 8 * MB_IN_BYTES ) { 1720 return false; 1721 } 1722 global $wpdb; 1723 $table = self::table_name(); 1724 $andere = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM `{$table}` WHERE status = %s AND file_path <> %s", self::ST_ORIGINAL, (string) $file ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared 1725 if ( $andere >= 40 ) { 1726 return false; 1727 } 1728 return Bastora_Asset_Integrity::plugin_datei_offiziell( $file ); 1702 1729 } 1703 1730 … … 1938 1965 $dateien = $wpdb->get_results( $wpdb->prepare( 1939 1966 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 1940 "SELECT scope, file_path FROM `{$table}` WHERE status IN (%s, %s ) GROUP BY scope, file_path ORDER BY MIN(id) ASC LIMIT %d, %d",1967 "SELECT scope, file_path FROM `{$table}` WHERE status IN (%s, %s, %s) GROUP BY scope, file_path ORDER BY MIN(id) ASC LIMIT %d, %d", 1941 1968 self::ST_ACTIVE, 1942 1969 self::ST_PENDING, 1970 self::ST_ORIGINAL, 1943 1971 $ab, 1944 1972 $max … … 1954 1982 $zeilen = $wpdb->get_results( $wpdb->prepare( 1955 1983 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 1956 "SELECT id, scope, file_path, rule_id, category, severity, status FROM `{$table}` WHERE scope = %s AND file_path = %s AND status IN (%s, %s )",1984 "SELECT id, scope, file_path, rule_id, category, severity, status FROM `{$table}` WHERE scope = %s AND file_path = %s AND status IN (%s, %s, %s)", 1957 1985 (string) $d['scope'], 1958 1986 (string) $d['file_path'], 1959 1987 self::ST_ACTIVE, 1960 self::ST_PENDING 1988 self::ST_PENDING, 1989 self::ST_ORIGINAL 1961 1990 ), ARRAY_A ); 1962 1991 if ( $zeilen ) { … … 1980 2009 $daten = array( 'status' => $status, 'origin' => substr( (string) $origin, 0, 20 ) ); 1981 2010 $formate = array( '%s', '%s' ); 2011 if ( self::ST_ACTIVE === $status && self::ST_ACTIVE !== (string) $row['status'] ) { 2012 $daten['first_seen'] = time(); 2013 $formate[] = '%d'; 2014 } 1982 2015 if ( self::spalte_urteil() ) { 1983 2016 $daten['urteil'] = substr( (string) $urteil, 0, 190 ); -
bastora-security-audit/trunk/readme.txt
r3818581 r3820756 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.3. 297 Stable tag: 2.3.30 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 101 101 == Changelog == 102 102 103 = 2.3.30 = 104 * **Mit Bastora Pro: Prüfung durch das Bastora-Team bei unveränderten Plugins aus wordpress.org.** Schlägt der Scanner in einer Datei an, die nachweislich genau dem Original entspricht, prüft das Bastora-Team den Fall selbst in einer Testumgebung. Deine Website bekommt eine Meldung zusammen mit der Lösung. Ohne Pro bleibt die Meldung wie bisher. 105 103 106 = 2.3.29 = 104 107 * **Weniger Meldungen, mehr Klarheit.** Bastora liest neue PHP-Dateien und prüft, was der Code kann: Befehle ausführen, Dateien schreiben, Daten nach außen schicken. Zwischenspeicher von Plugins wie WPML bleiben still. … … 109 112 * **Einrichtung jederzeit fortsetzen.** Bleibt der Server länger beschäftigt, hält die Einrichtung an. Ein Klick setzt sie später fort. 110 113 111 = 2.3.27 =112 * **Anmeldung über Mitglieder- und Theme-Formulare läuft reibungslos.** Bastora prüft das Login-Captcha auf der WordPress-Anmeldeseite. Mitgliederplugins, Shops und Themes mit eigener Anmeldung melden Deine Nutzer direkt an.113 * **Login-Widgets mit Captcha.** Anmeldeformulare aus Widgets und Blöcken bekommen die Sicherheitsprüfung automatisch, auch auf zwischengespeicherten Seiten.114 * **Faire Sperre nach Tippfehlern.** Ein weiterer Versuch während einer Sperre verlängert sie nicht. Mitgliederformulare erlauben so viele Versuche wie die WordPress-Anmeldung.115 * **Passwortmanager melden zuverlässig an.** Auch automatisches Absenden und eine lange offene Anmeldeseite klappen beim ersten Versuch.116 117 114 == Upgrade Notice == 118 115 119 = 2.3. 29=120 Empfohlen. Deutlich weniger Meldungen zu harmlosen Dateien, jeder Fund mit Erklärung und Empfehlung.116 = 2.3.30 = 117 Wartungsversion. Mit Bastora Pro prüft das Bastora-Team Treffer in unveränderten Plugins aus wordpress.org selbst. 121 118 122 119 == Privacy == -
bastora-security-audit/trunk/sbom.json
r3818581 r3820756 15 15 "component": { 16 16 "type": "application", 17 "bom-ref": "bastora-security-audit@2.3. 29",17 "bom-ref": "bastora-security-audit@2.3.30", 18 18 "name": "bastora-security-audit", 19 "version": "2.3. 29",19 "version": "2.3.30", 20 20 "publisher": "Mathias Grothe", 21 21 "licenses": [ … … 26 26 } 27 27 ], 28 "purl": "pkg:wordpress-plugin/bastora-security-audit@2.3. 29"28 "purl": "pkg:wordpress-plugin/bastora-security-audit@2.3.30" 29 29 } 30 30 },
Note:
See TracChangeset
for help on using the changeset viewer.