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

30 Коммитов

Автор SHA1 Сообщение Дата
Hal Wine 258d8eacf8
Remove dependence on repo2docker (#91)
* Changes for simple container

Makefile changes:
  - 'build' target now builds simple container
  - 'build-old' target builds the old repo2docker way
  - 'debug-build' for docker build issues
  - docker image tag includes git ref & date stamp

Dockerfile changes:
    - pass hadolint
    - change permissions to allow notebook signing for trust
    - update user name for new base image

set_secrets_in_env.sh changes:
    - support '--develop' option to set bogus values for testing jupyter
      & notebook parts

* Update Notebook so signing works

Somewhere along the line, jupyter changed to needing an 'id' property
per cell for proper signing, without changing the ipynb version number.

Fix is to use `nbconvert --to ipynb` to rewrite file.

* Build Environment Hygene

- Update versions of pre-commit
  - updated hadolint config
- Make things more normal
  - stop using port 10001
  - add '--unset' option for testing
- Cleaned up Dockerfile
- Cleaned up Makefile
  - removed method for older image build method
- updated documenation for new image build process
- removed no-longer-needed binder config files

* Fix bug with eliminating first name from ACL search

Co-authored-by: Hal Wine <hal@dtor.com>
2022-05-20 09:00:01 -07:00
Hal Wine 53b5b25544
Allow credentials to be supplied via environment variables (#80)
* a verified_github_login should suppress warning

We'd output a warning based on "no access" for certain departments. If
we have a verified GitHub login, we can safely assume that no access
means someone already removed it.

* Allow credentials to be preset in environment
2021-11-20 10:50:12 -08:00
Hal Wine 9499d8c0bd
ACL listing output (#77)
Crawl all repos looking for potential ACL in config files.

This approach has a lot of false positives, and the results need to be interpreted by someone with domain knowledge.

The "final output" is in CSV format -- by copy/paste into gSheets, a more reviewable view can be constructed.

There are heuristic ignore lists for orgs, repos, and paths-in-any-repo to be excluded to improve run time. This process makes heavy use of the search API, which has a very low quota that resets every minute. Expect to see many "waiting for quoto" interim messages.

Other work:
* Fix pre-commit python version for nb-ensure-clean. nb-ensure-clean requires python 3.6. A method in base64 is no longer supported in python 3.9
2021-11-03 16:07:14 -07:00
Hal Wine cb5a0f93cb
Works from fresh checkout
There were a few problems that were masked by missing conda/jupyter
config files. Those are added now. They would be "fixed" in my working
instances when using `make run-update` as the configuration changes were
saved in my local directory for use next time. This caused "good" images
to only be buildable from my working directory, and not from others.

Rearranged some conda & jupyter config files to unclutter root dir.
  - `repo2docker` config files are now in directory `binder` (name
    forced by tool)
  - Notebook moved to directory `notebooks`, which is the root of the
    jupyter server started by the instance.

Requirements file was out of date -- so let's force folks to use poetry.
:)
2021-07-30 14:18:15 -07:00
Hal Wine c3f4690aae
Hwine/py2 docker image (#74)
* Install pre-commit & initial run

* Add targets for repo2docker usage

* Switch to ipywidgets data entry for email

    This change minimizes the chance of committing the notebook with PII
    in it.

    This moves the entered text to an "output" section of the cell,
    which must be removed before commit (enforced by pre-commit
    filters).

    It also makes the workbook easier to use, as you no longer have to
    worry about messing up the python string formatting.

* Improved limit exhaustion reporting

* working using docker

* Combine phrases into paired tokens

    No GitHub login has embedded spaces. So don't try to find one (404
    error). Create possible logins by concatinating the tokens.

* Working with extensions installed.

* Update jupyter notebook

misc fixes

* update docs

* Install of all needed extensions now works

* Purge docker images that are being replaced.

* General cleanup

    - formatting much cleaner now, so can copy/paste to email
    - addressed several unicode issues - text output would throw
    - reorganized cell hierarchy for shorter scrolling

* Fix detecting if any permissions found

    The old test (# lines returned) became invalid when the report
    formatting was done. All positive hits now contain "FOUND!". Absense
    of that token mean no matches.

* Updated tests & orgs

* Tune cache sizes

    Also added some cells to debug cache issues. They must be manually
    run.

* team_update.py creates team if needed

* some cleanup highlighted by vs-code

* Support for reading EML file added.

* Added CIS lookup of verified GitHub login

* Update README

* wip - now building with all extensions operable

    Needed to pin the conda environments by exporting environment from
    working image, then using that to recreate what we need after
    repo2docker does the framework.

    * Commit conda envronment files

    * Tweaks for fully functioning docker build
2021-07-28 15:20:43 -07:00
Hal Wine 236d8f9b35
flag recent changes more obviously 2021-05-02 07:39:25 -07:00
Hal Wine 53f7d09512
Update to work on GitHub3.py v1.3.0 (#71)
* Update to work on GitHub3.py v1.3.0

A few API changes, all run now (there may be some issues with scripts
that make permanent changes, as I didn't execute those parts).

* Works with jupyter notebooks!

Full support isn't there yet, but there are no major errors.
2021-05-02 07:32:11 -07:00
Hal Wine 62a28ac8da
Update to Python 3 (#69)
Also remove use of .credentials file
2021-05-01 14:08:35 -07:00
Hal Wine 1e5f7ab262 Update docs
Fixes GH-39 and recommends use of environment variables.
2020-04-10 13:48:51 -07:00
Hal Wine 61eb739587 Manage repository collaborator invites
Fixes GH-57

Invitations can also be extended to outside collaborators at the
repository level. These changes extend the existing code to poll for all
such invitations (each repository in the organization must be
interrogated).
2019-12-10 17:12:39 -08:00
Hal Wine 9e7fa67268 Add Jupyter Notebook for user searches.
See the README -- this is an overly broad search, you need to double
check before assuming any match is valid.
2019-10-03 17:05:52 -07:00
Hal Wine f4afb24544 Print basic org info at terminal
There seem to be a number of details about an org that are of occasional
interest. This prints the publically available info, and whatever
private info the user has rights to see.
2018-12-28 11:53:08 -08:00
Hal Wine 8e2ee89bb7 explain this branch 2018-12-28 10:57:17 -08:00
Hal Wine 1e9e69035c Add script to automate Audit Log download
Uses selenium to drive an instance of firefox to log into GitHub and
download the audit log in JSON format. See README.md for dependencies.

And update license reference.
2018-07-12 17:19:04 -07:00
Hal Wine 8e301413f3 Fix lfs.py annoyances
Added to README, and defaults to python2 (like the rest of the scripts
in this repo).

Added github_selenium to requirements.txt, and made lfs.py
executable.
2018-02-12 15:32:59 -08:00
Hal Wine b6527eb17a Script to manipulate admin teams.
Teams are useful for communication, either via team mentions in issues,
or using the GitHub discussion feature. Currently supported team names
are:
    admin-all-org-owners
    admin-all-org-members

We no longer need to manipulate teams for 2FA reasons, so rename and
modify to support admin team updates.
2017-12-01 11:46:24 -08:00
Giorgos Logiotatidis f5aa9b1099 Typo fix 2016-12-10 19:48:55 -10:00
Hal Wine bd4e7eab11 Remove 2FA enforcement
2FA enforcement is now configurable for organizations on GitHub. Leave
the monitoring script, as this is useful when preparing to make an
organization 2FA required.
2016-11-22 13:45:31 -08:00
Hal Wine 540469ca5e add get_active_hooks.py script 2016-11-18 14:01:23 -08:00
Hal Wine 654c7e0cbb Scripted compliance for 2FA requirement.
The script will notify members out of compliance, and give them X days
(script executions) to comply before having their organization
membership revoked. 'X' is configurable by the number of teams created
following the pattern.

Script requires permissions for 'admin:org' and 'repo' (if your
communication repository is private).
2016-06-23 18:21:37 -07:00
Hal Wine 0c59ca70b3 Rename script to reflect added functionality.
This script now reports on both admins and all members for lack of 2fa
being enabled.
2016-05-22 13:53:58 -07:00
Fred Wenzel da6ece3c89 old_repos README 2015-05-12 13:57:59 -07:00
Fred Wenzel a9a4a46500 Tally script for webhooks/services based on audit log export. 2015-02-25 16:26:17 -08:00
Fred Wenzel 47523673a9 JS to export audit log (screen scraping. Uuugggllllyyy 2015-02-24 17:26:31 -08:00
Fred Wenzel 1bb446c6ce Fix description of contributing script 2015-02-04 11:47:27 -08:00
groovecoder ba1398fc09 document admins.py in README.md 2015-02-03 14:59:10 -06:00
Fred Wenzel 04a12425e8 I cannot markdown 2015-01-08 14:48:50 -08:00
Fred Wenzel 43469f4a50 more generic 2015-01-08 14:46:47 -08:00
Fred Wenzel aaf3223818 Identify repos with or without CONTRIBUTING file 2015-01-08 14:43:40 -08:00
Fred Wenzel 8d3dafe503 Front matter. 2015-01-08 10:47:10 -08:00