From 274392d7454073ee52b6ebca045e1d84b82f6693 Mon Sep 17 00:00:00 2001 From: Daniel Orner Date: Sun, 24 Nov 2024 10:37:55 -0500 Subject: [PATCH 1/2] fix --- app/jobs/backup_db_rds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/backup_db_rds.rb b/app/jobs/backup_db_rds.rb index 9bd6f07eff..d5eb004586 100644 --- a/app/jobs/backup_db_rds.rb +++ b/app/jobs/backup_db_rds.rb @@ -1,6 +1,6 @@ # to be called from Clock module BackupDbRds - def run + def self.run logger = Logger.new($stdout) logger.info("Performing dump of the database.") From 3512f96b7b3efb5a97d298211c206f3cf73ca448 Mon Sep 17 00:00:00 2001 From: Daniel Orner Date: Sun, 24 Nov 2024 10:40:19 -0500 Subject: [PATCH 2/2] Fix brakeman ignore --- config/brakeman.ignore | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/config/brakeman.ignore b/config/brakeman.ignore index 606159e6b3..225ff60f53 100644 --- a/config/brakeman.ignore +++ b/config/brakeman.ignore @@ -3,7 +3,7 @@ { "warning_type": "Command Injection", "warning_code": 14, - "fingerprint": "0f98f6aeae590aca0d8eebf04dbd2dcaf4d1252822f138b4bcfe6e03455e5b4a", + "fingerprint": "5dd8c58cca239b1a2527f25255c49c8800a31e5ec8cb8e31e14003fc435dd677", "check_name": "Execute", "message": "Possible command injection", "file": "app/jobs/backup_db_rds.rb", @@ -14,7 +14,7 @@ "location": { "type": "method", "class": "BackupDbRds", - "method": "run" + "method": "s(:self).run" }, "user_input": "ENV[\"DIAPER_DB_PASSWORD\"]", "confidence": "Medium", @@ -45,28 +45,8 @@ 22 ], "note": "" - }, - { - "warning_type": "SQL Injection", - "warning_code": 0, - "fingerprint": "db8503246322c7079274c6aa7e68675a336b4d8dd4fb9c2bb6c566545b139c8a", - "check_name": "SQL", - "message": "Possible SQL injection", - "file": "config/initializers/postgres.rb", - "line": 9, - "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", - "code": "connection.select_all(\"select pg_terminate_backend(pg_stat_activity.pid) from pg_stat_activity where datname='#{configuration_hash[:database]}' AND state='idle';\")", - "render_path": null, - "location": { - "type": "method", - "class": "PostgreSQLDatabaseTasks", - "method": "drop" - }, - "user_input": "configuration_hash[:database]", - "confidence": "Medium", - "note": "" } ], - "updated": "2024-11-24 09:44:01 -0500", + "updated": "2024-11-24 10:40:00 -0500", "brakeman_version": "6.2.1" }