diff --git a/.github/workflows/browserstack_troubleshoot.yml b/.github/workflows/browserstack_troubleshoot.yml deleted file mode 100644 index a7ed590ac..000000000 --- a/.github/workflows/browserstack_troubleshoot.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'BrowserStack Credentials Check' - -on: - pull_request: - branches: [ master ] - -jobs: - test-browserstack-creds: - runs-on: ubuntu-latest - steps: - - name: Test BrowserStack credentials - env: - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - run: | - curl -u "${BROWSERSTACK_USERNAME}:${BROWSERSTACK_ACCESS_KEY}" https://api.browserstack.com/automate/plan.json \ No newline at end of file diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 98791b247..f0c01959c 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -5,13 +5,6 @@ on: branches: [ master ] jobs: - test-browserstacks-creds: - runs-on: ubuntu-latest - steps: - - name: Test BrowserStack credentials - run: | - curl -u "${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESS_KEY }}" https://api.browserstack.com/automate/plan.json - approve: runs-on: ubuntu-latest @@ -34,10 +27,6 @@ jobs: username: ${{ secrets.BROWSERSTACK_USERNAME }} access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - - name: Test BrowserStack credentials - run: | - curl -u "${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESS_KEY }}" https://api.browserstack.com/automate/plan.json - - name: 'BrowserStack Local Tunnel Setup' # Invokes the setup-local action uses: browserstack/github-actions/setup-local@master with: diff --git a/Gemfile b/Gemfile index 76355a058..c8f2fc27e 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,7 @@ gem 'term-ansicolor', :require => 'term/ansicolor' gem 'rubyzip', '~> 2.3' gem 'espeak-ruby', '~> 1.1.0' # Text-to-Voice gem 'rake', '~> 13.2' +gem 'activerecord', '~> 7.0' gem 'otr-activerecord', '~> 2.2.0' gem 'sqlite3', '~> 1.4' gem 'rubocop', '~> 1.66.1', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 6f3e432b3..5f3d09c99 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,13 @@ GEM remote: https://rubygems.org/ specs: - activemodel (7.1.4) - activesupport (= 7.1.4) - activerecord (7.1.4) - activemodel (= 7.1.4) - activesupport (= 7.1.4) + activemodel (7.1.4.2) + activesupport (= 7.1.4.2) + activerecord (7.1.4.2) + activemodel (= 7.1.4.2) + activesupport (= 7.1.4.2) timeout (>= 0.4.0) - activesupport (7.1.4) + activesupport (7.1.4.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -268,6 +268,7 @@ PLATFORMS x86_64-linux DEPENDENCIES + activerecord (~> 7.0) ansi (~> 1.5) async (~> 1.32) async-dns (~> 1.3) diff --git a/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb b/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb index 5d4d99789..f5b621c8c 100644 --- a/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb +++ b/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb @@ -50,7 +50,7 @@ RSpec.describe 'AutoRunEngine Test', run_on_browserstack: true do OTR::ActiveRecord.establish_connection! end context = ActiveRecord::Migration.new.migration_context - ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration? + ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration? BeEF::Core::Migration.instance.update_db! diff --git a/spec/beef/core/main/handlers/browser_details_handler_spec.rb b/spec/beef/core/main/handlers/browser_details_handler_spec.rb index cc172e871..f47deec09 100644 --- a/spec/beef/core/main/handlers/browser_details_handler_spec.rb +++ b/spec/beef/core/main/handlers/browser_details_handler_spec.rb @@ -48,9 +48,9 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2') OTR::ActiveRecord.establish_connection! end - context = ActiveRecord::Migration.new.migration_context - ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration? + context = ActiveRecord::Migration.new.migration_context + ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration? BeEF::Core::Migration.instance.update_db! # Spawn HTTP Server diff --git a/spec/beef/extensions/requester_spec.rb b/spec/beef/extensions/requester_spec.rb index 6a9298224..4f4d7e929 100644 --- a/spec/beef/extensions/requester_spec.rb +++ b/spec/beef/extensions/requester_spec.rb @@ -40,7 +40,7 @@ RSpec.describe 'BeEF Extension Requester' do # Migrate if required context = ActiveRecord::Migration.new.migration_context - ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration? + ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration? # Start HTTP hook server http_hook_server = BeEF::Core::Server.instance diff --git a/spec/beef/extensions/websocket_hooked_browser_spec.rb b/spec/beef/extensions/websocket_hooked_browser_spec.rb index 774cf1447..7abd8d97c 100644 --- a/spec/beef/extensions/websocket_hooked_browser_spec.rb +++ b/spec/beef/extensions/websocket_hooked_browser_spec.rb @@ -49,7 +49,7 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do OTR::ActiveRecord.establish_connection! end context = ActiveRecord::Migration.new.migration_context - ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration? + ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration? BeEF::Core::Migration.instance.update_db! # Spawn HTTP Server print_info 'Starting HTTP Hook Server' diff --git a/spec/beef/modules/debug/test_beef_debugs_spec.rb b/spec/beef/modules/debug/test_beef_debugs_spec.rb index b1e7fce94..79543a5d9 100644 --- a/spec/beef/modules/debug/test_beef_debugs_spec.rb +++ b/spec/beef/modules/debug/test_beef_debugs_spec.rb @@ -47,7 +47,7 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do OTR::ActiveRecord.establish_connection! end context = ActiveRecord::Migration.new.migration_context - ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration? + ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration? BeEF::Core::Migration.instance.update_db!