Граф коммитов

38 Коммитов

Автор SHA1 Сообщение Дата
Stefan Zabka b29c3f4052
Data Aggregator Rewrite (#753)
* First steps in the rewrite

* Fixed import paths

* One giant refactor

* Fixing tests

* Adding mypy

* Removed mypy from pre-commit workflow

* First draft on DataAggregator

* Wrote a DataAggregator that starts and shuts down

* Created tests and added more empty types

* Got demo.py working

* Created sql_provider

* Cleaned up imports in TaskManager

* Added async

* Fixed minor bugs

* First steps at porting arrow

* Introduced TableName and different Task handling

* Added more failing tests

* First first completes others don't

* It works

* Started working on arrow_provider

* Implemented ArrowProvider

* Added logger fixture

* Fixed test_storage_controller

* Fixing OpenWPMTest.visit()

* Moved test/storage_providers to test/storage

* Fixing up tests

* Moved automation to openwpm

* Readded datadir to .gitignore

* Ran repin.sh

* Fixed formatting

* Let's see if this works

* Fixed imports

* Got arrow_memory_provider working

* Starting to rewrite tests

* Setting up fixtures

* Attempting to fix all the tests

* Still fixing tests

* Broken content saving

* Added node

* Fixed screenshot tests

* Fixing more tests

* Fixed tests

* Implemented local_storage.py

* Cleaned up flush_cache

* Fixing more tests

* Wrote test for LocalArrowProvider

* Introduced tests for local_storage_provider.py

* Asserting test dir is empty

* Creating subfolder for different aggregators

* New depencies and init()

* Everything is terribly broken

* Figured out finalize_visit_id

* Running two event loops kinda works???

* Rearming the event

* Introduced mypy

* Downgraded black in pre-commit

* Modifying the database directly

* Fixed formatting

* Made mypy a lil stricter

* Fixing docs and config printing

* Realising I've been using the wrong with

* Trying to figure arrow_storage

* Moving lock initialization in in_memory_storage

* Fixing tests

* Fixing up tests and adding more typechecking

* Fixed num_browsers in test_cache_hits_recorded

* Parametrized unstructured

* String fix

* Added failing test

* New test

* Review changes with Steven

* Fixed repin.sh and test_arrow_cache

* Minor change

* Fixed prune-environment.py

* Removing references to DataAggregator

* Fixed test_seed_persistance

* More paths

* Fixed test display shutdown

* Made cache test more robust

* Update crawler.py

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Slimming down ManagerParams

* Fixing more tests

* Update test/storage/test_storage_controller.py

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Purging references to DataAggregator

* Reverted changes to .travis.yml

* Demo.py saves locally again

* Readjusting test paths

* Expanded comment on initialize to reference #846

* Made token optional in finalize_visit_id

* Simplified test paramtetrization

* Fixed callback semantics change

* Removed test_parse_http_stack_trace_str

* Added DataSocket

* WIP need to fix path encoding

* Fixed path encoding

* Added task and crawl to schema

* Fixed paths in GitHub actions

* Refactored completion handling

* Fix tests

* Trying to fix tests on CI

* Removed redundant setting of tag

* Removing references to S3

* Purging more DataAggregator references

* Craking up logging to figure out test failure

* Moved test_values into a fixture

* Fixing GcpUnstructuredProvider

* Fixed paths for future crawls

* Renamed sqllite to official sqlite

* Restored demo.py

* Update openwpm/commands/profile_commands.py

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Restored previous behaviour of DumpProfileCommand

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Removed leftovers

* Cleaned up comments

* Expanded lock check

* Fixed more stuff

* More comment updates

* Update openwpm/socket_interface.py

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Removed outdated comment

* Using config_encoder

* Renamed tar_location to tar_path

* Removed references to database_name in docs

* Cleanup

* Moved screenshot_path and source_dump_path to ManagerParamsInternal

* Fixed imports

* Fixing up comments

* Fixing up comments

* More docs

* updated dependencies

* Fixed test_task_manager

* Reupgraded to python 3.9.1

* Restoring crawl_reference in mp_logger

* Removed unused imports

* Apply suggestions from code review

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Cleaned up socket handling

* Fixed TaskManager.__exit__

* Moved validation code into config.py

* Removed comment

* Removed comment

* Removed comment

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-02-22 17:51:32 +01:00
Stefan Zabka b252248899
Github Actions for OpenWPM (#838)
* First action test

* Fixing paths

* Adding cache to github actions

* Added badge

* Debugging

* Trying better caching

* More trying

* Trying tests

* Fixing tests

* Removed travis.yml

* Changed comment in re-tests.yaml

* Update environment.yaml

Co-authored-by: Steven Englehardt <se@senglehardt.com>

* Update .github/workflows/run-tests.yaml

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Update README.md

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Changed other references from Travis to CI

* Update .github/workflows/run-tests.yaml

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Restored cov:check for webextension tests

* Removed webextension fromt test matrix

* All tests should run to completion

Co-authored-by: Steven Englehardt <se@senglehardt.com>
Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-01-29 12:21:36 +01:00
Ankush Dua db1186a9f6
Refactoring browser and manager params into dataclasses (#807)
* initial file commit

* add new dependency for dataclasses

* implemeted basic BrowserParams dataclass

* dependencies update

* file reformat

* implemented basic ManagerParams dataclass

* Update environment dependencies

* Added new error class to validate
 browser and manager params

* file reformat

* Update scripts/environment-unpinned.yaml

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* added validations for BrowserParams dataclass

* Update openwpm/config.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Removed unnecessary checks

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Changed error string formatting

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Changed filenamea and necessary imports to resolve conflicts with new master branch(refering to PEP-8 reformatting)

* Revert "Changed filenamea and necessary imports to resolve conflicts with new master branch(refering to PEP-8 reformatting)"

This reverts commit e550c3bd60.

* Revert "Merge branch 'master' into turn_browser_and_manager_params_into_dataclasses"

This reverts commit aff5a384e7, reversing
changes made to 6ecaf5d0a9.

* Revert "Update environment dependencies"

This reverts commit 385825b10a.

* Revert "Merge branch 'turn_browser_and_manager_params_into_dataclasses' of https://github.com/ankushduacodes/OpenWPM into turn_browser_and_manager_params_into_dataclasses"

This reverts commit 6ecaf5d0a9, reversing
changes made to e550c3bd60.

* file reformat

* finalized validate_browser_params function

* fixed typo in error string

* added validations for manager_params

* Explanation for using list for supported browser

* Revert "Revert "Merge branch 'master' into turn_browser_and_manager_params_into_dataclasses""

This reverts commit 6c3e98e57b.

* Revert "Revert "Changed filenamea and necessary imports to resolve conflicts with new master branch(refering to PEP-8 reformatting)""

This reverts commit fc8f48f187.

* import name change from .Error to .error

* moved call_instrument check to config.py

* fixed accidental use of dict syntax in a class

* moved save_content check from deploy_firefox.py

* deleting redundent file

* deleted more redundent files

* removed redundant imports

* added new save_content check

* property name changevariables can not have '-'

* added new attribute  to ManagerParams

* adapted files to validate manager & broswer params

- also added logic to convert the objects(BrowserParams and ManagerParams) to dictionaries to not break the functionality
- also updated demo.py to work with new file names on this branch

* removed obsolete documentaion

* Dependency Update

* Revert "Dependency Update"

This reverts commit 8ee3a02b17.

* Dependencies Update

* unset memory and process watchdogs

* add new output_format and failure_limit checks

* inheriting dataclasses and added type hints to fn

* added todo

* fixed inheritance of dataclasses acc. to plan

* refactor use of dict to use dataclasses(pending)

* more refactoring use of dict to dataclasses -
Also changed some type hints related to new refactoring

* fixed screenshot directory issue -
because of which some of the tests were failing

* added try-except clause for unexpected errors

* added tests to cover dataclasses

* added some new and edited some old docs

* refactor use of __dict__ to dataclass.to_dict()

* Revert "refactor use of __dict__ to dataclass.to_dict()"

This reverts commit a4f35513fa.

* fixed some tests

* refactor use of __dict__ in favor of
dataclass.to_dict() method

* removed some TODOS

* fixed dataclases validation tests

* Update docs/Configuration.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update docs/Configuration.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update docs/Configuration.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update openwpm/config.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update openwpm/config.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update openwpm/task_manager.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* minor fixed wrt polishing the PR

* added new check and test for crawl configs

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
2020-12-02 10:10:45 +01:00
Fukurou Makoto 051a3846cb
Module & Imports conformed to PEP8 (#806)
* Module & Imports conformed to PEP8

* Conformed tests to PEP8

* Conformed tests to PEP8 (2)

* Updated webdriver test for PEP8

* Updated test_timer for PEP8

* Deleting Workspace file

* renamed files to match PEP8

* Update docs/Using_OpenWPM.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Changed serversocket to ServerSocket

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
2020-11-24 17:34:04 +01:00
Stefan Zabka 53e4516930
V0.13.0 release (#798)
* Preparing v0.13.0 release

* Made links work

* Rebuild extension

* Fixed extension build script

* Removed prepare step as it breaks fresh installs

* Changed openwpm import in tests to absolute

* Fixed test_timer.py

* Reverted changes to webext-instrumentation/package.json

* Pinning to node<15.0.0

* Rebuilding package-lock.json

* Fixed test

* Also mentioned LordReigns

* Fixed links to CONTRIBUTING.md

* Moved to FF83
2020-11-19 14:24:06 +01:00
Ankush Dua 502cd830ad
Renaming automation module to openwpm (#793) 2020-11-14 16:06:51 +01:00
vringar 0258ae527a Added black 2020-09-11 15:14:09 +02:00
Kainaat Singh fcefcc8756 Simplify command issuing 2020-03-25 21:08:10 +05:30
Stefan Zabka 034b937b34 removed all __future__ 2019-11-20 10:54:57 +01:00
englehardt 71fa3ee936 Fix flake8 issues 2019-08-05 13:56:55 -07:00
englehardt 1f4f22238b Fix isort relative import issues 2019-04-26 10:07:40 -07:00
Nihanth Subramanya 2ea54426b3 Update sdp offer expectations in test_extension.py for firefox 65 2019-02-08 18:02:03 -08:00
Nihanth Subramanya c2465e726a Fix test_extension.py 2019-02-07 17:32:44 -08:00
Stephen Donner 6ffc8f6c13 Add and run flake8-isort in Travis builds
Add [isort] to setup.cfg, per docs

Fix flake8-isort errors in /test/*

Add mapped flake8-isort to pkg_name_mapping()

Fix one isort error

See https://travis-ci.org/citp/OpenWPM/jobs/407022965

Try fixing second flake8-isort error

See https://travis-ci.org/citp/OpenWPM/jobs/407388964

Moar fixes for flake8-isort validation

See https://travis-ci.org/citp/OpenWPM/jobs/407390660

This |isort --diff| run made flake8-isort happy, locally

Add future, six, and six.moves to isort's known_future_library section

Try outputting suggested flake8-isort fixes

Address a slew of flake8-isort issues, in Travis

Another round of flake8-isort 'fixes?

Add configs to isort; fix a few flake8-isort issues

Should fix isort errors

Hopefully final isort fixes

I think I cracked it: fixed isort issues

Remove debug flake8-isort command in Travis builds

Just update known_first_party with the couple I know
2018-07-25 04:05:07 -07:00
Stephen Donner 496f8b227c Fix a flew of flake8 issues 2018-07-04 17:14:17 -07:00
englehardt ffffb36f90 New query_db API + PEP8 Fixes 2017-10-10 14:35:13 -04:00
englehardt fae8b8df88 Removing battery API instrumentation 2017-10-04 20:20:38 -04:00
englehardt 6e9db85593 Merge branch 'python3' of git://github.com/zackw/OpenWPM into ff52 2017-10-04 12:04:39 -04:00
dreisman 7b38245025 Adding battery status instrumentation, tested and complete 2017-04-17 23:04:52 -04:00
Zack Weinberg 1c5d9356c0 Apply python-modernize + some hand tidy-ups.
This should get us 90% of the way to Python 3 support.
2017-03-09 11:00:54 -05:00
englehardt 4f94f24ba1 Save javascript function arguments as json instead of separate rows
This should help reduce the javascript table size by about 33% and will
make it easier to filter rows by one argument. We choose to save the
arguments as a json object instead of a strified array to make slicing
easier, both in a pandas dataframe and with sqlite extensions like
`json1`.
2017-01-25 17:29:41 -05:00
englehardt 6cb26dbfa3 Preventing logs of gets for instrumented objects and functions
In #133 I intentionally logged gets of nested, instrumented objects and
functions with the intention of having full coverage. However, this
adds quite a bit of records to the database.
2017-01-25 12:04:13 -05:00
englehardt 729f0dbe51 Add support for recursive object instrumentation 2017-01-05 16:47:57 -05:00
englehardt 3aeb5a3a54 Refactor instrumentObject so functions are fully instrumented.
Previously function instrumentation was treated as an alternative operation
to other property instrumentation. This isn't necessary as functions
are accessed the same way other object properties are, so we should
instrument access to them in the same way. Instead, the logging of a
function calls is done by additional instrumentation of the returned
function.
2017-01-04 18:50:29 -05:00
Gunes Acar 2f2bf9ceba Refactor utilities, add a database utility module.
Add a new utility module for DB related
functions. This is to be used by test and data analysis code.

Move domain_utils.py to automation/utilities.
Remove repeating PSL related code.
2017-01-01 14:10:24 +01:00
Gunes Acar 60f3ac37ec Add instrumentation for document.cookie.
Log cookie read and writes, capture call stack.
2016-12-21 23:24:40 +01:00
Gunes Acar 16d67cd803 Move boilerplate get_config code to the parent test class.
Read the python modules to be tested from requirements.txt

Add tests to make sure firefox-bin directory and the Firefox
binary within exist.

Fix some PEP8 warnings in the test code.

Remove unused imports.
2016-12-18 20:52:23 +01:00
Gunes Acar 50a0330d51 Store timestamp for javascript instrumentation.
We use `canvas_fingerprinting.html` test page to test both
property access and function call instrumentation (logCall and logValue).
2016-12-15 14:53:59 +01:00
englehardt 5d86590149 Making extension-based HTTP instrumentation default and deprecating
proxy instrumentation.

The naming of sql tables and browser params have been updated to reflect
that the extension HTTP instrumentation is preferred to the proxy. A few other
notable changes:
(1) Extension HTTP instrumentation is preferred, but still off-by-default
(2) The proxy is now off-by-default and shouldn't be used.
(3) browser_params['save_javascript'] uses the extension, proxy-based
    javascript saving is controlled with browser_params['save_javascript_proxy']
(4) The "post processing pipeline" (which was only used to parse HTTP
    cookies) has been removed and the TaskManager::close API updated.
2016-12-05 12:32:55 -05:00
Gunes Acar c7535dee0d Store function name and eval/Function details for the JS calls.
Remove regex based call script URL parsing.
Remove redundant array access and parenthesis.
Add test for the call stack parsing.

Fixes #49.
2016-12-02 15:14:45 +01:00
englehardt da2b5e0de2 Refactor extension configuration and make extension on by default. Close #107 2016-11-21 19:22:40 -05:00
dreisman a3734b32d5 disabling audiocontext test for travis CI 2016-10-04 15:23:11 -04:00
englehardt 4a9f18a86b Adding Audio API instrumentation and tests 2016-09-12 11:18:22 -04:00
dreisman 8aff632e59 Added test for visit_id in firefox extension, minor style/comment changes 2016-05-05 11:38:56 -04:00
Gunes Acar c9e1ed8ab0 Inject intrumentation code to page content as a script element.
Add a manual_test module to make it easy to run interactive tests.

Add plugin and mimeType instrumentation.

Log line number, column number of the calling function and stack
entries.

Add local test files for Flash cookie and JS cookie testing.

Add test to make sure the required Python and OS packages are installed.

Mark test_crawl as "slow" to easily avoid calling it. Running
py.test -m "not slow" will exclude crawl test but will run all the
remanining tests.

Add test utility functions to DRY test code.

Add a WebRTC test.

Add a parent class and visit method for the tests.

Fix address in use errors related to local server
by using a py.test fixture with session scope.
2016-04-12 02:47:05 +02:00
englehardt ff75b86653 Removing extra whitespace from all infrastructure files 2015-12-31 09:21:10 -08:00
englehardt 7bfeefaf02 Adding test for canvas fingerprinting 2015-12-29 16:43:17 -05:00
englehardt c737f9c40b Adding in tests for property enumeration instrumentation 2015-12-21 16:21:15 -05:00