-
Notifications
You must be signed in to change notification settings - Fork 1
Release #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Release #83
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
b302448
record_type_add command added
adeshmukh-ks cf7532f
PR review changes, fido upgrade change, login error eddress
adeshmukh-ks 83c781c
Added logger
adeshmukh-ks 093cd1c
record_type_edit and record_type_delete functions added
adeshmukh-ks d1eaa2b
record_type_info and load_record_types functions added (#12)
adeshmukh-ks 39738e6
download-record-types command added
adeshmukh-ks e570e17
secrets-manager-app list and get functions and commands
adeshmukh-ks 231a707
Corrected imports
adeshmukh-ks 4db4ccb
secrets-manager-app create and remove commands
adeshmukh-ks 67c0a0d
download-record-types bug fix
adeshmukh-ks 1992530
Yubikey login method bug fix
adeshmukh-ks 672a8f1
Bug fix in delete-attachment command and added rm command
adeshmukh-ks 33a1d5f
Secrets Manager App Share-Unshare, Share Record and Share Folder comm…
adeshmukh-ks 5f4a904
Secrets manager client add and remove commands
adeshmukh-ks b582d82
Added secrets-manager-share add and remove commands
adeshmukh-ks 7956b87
Added get command and self-destruct feature
adeshmukh-ks 513a02d
Used enumerate_fields
adeshmukh-ks 41a6a08
Added uid flags
adeshmukh-ks 1fb50aa
One-time-share commands
adeshmukh-ks d97337b
breachwatch scan command
adeshmukh-ks 4c7477d
Python SDK Command examples
sdubey-ks d0ad7a7
Protobuff file updates
adeshmukh-ks 0c14177
Python SDK command examples
sdubey-ks e13c656
Bug Fixes
adeshmukh-ks efa1445
Breachwatch password and search record commands
adeshmukh-ks 2b44c49
Biometric Commands and Authentication Implemented
adeshmukh-ks 628120d
Password-report command and bug fixes
adeshmukh-ks e211e98
Added examples for enterprise and record attachment commands
adeshmukh-ks 9ef4a94
Trash commands added and bugs fixed
adeshmukh-ks 796a02c
Team handling bug in get command
adeshmukh-ks 1f35210
Clipboard Copy and Record History commands added
adeshmukh-ks fef509a
Audit log command added
adeshmukh-ks 539d3af
Read me update
adeshmukh-ks 4f1035b
Transform folder command added
adeshmukh-ks 1e17432
Readme update in detail
adeshmukh-ks 4e5be7c
Examples added
adeshmukh-ks c2b54b5
Create user command added
adeshmukh-ks ab037d8
Find duplicate command added
adeshmukh-ks 48662cc
Transfer user command added
ukumar-ks d7917ea
Record permission command added
adeshmukh-ks f514c47
Added examples of user and record related command
ukumar-ks 41cdce1
Device approve command added
adeshmukh-ks ded8b3f
Github publish workflow
sk-keeper 30d9551
Release 1.0.0
sk-keeper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
50 changes: 21 additions & 29 deletions
50
.github/workflows/publish-to-pypi.yml → .github/workflows/publish-cli-to-pypi.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,79 +1,71 @@ | ||
| name: Publish Commander to PyPi | ||
| name: Publish CLI to PyPi | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release (Tag from Keeper-Security/keeper-sdk-pyton) | ||
| description: Version to release (Tag from Keeper-Security/keeper-sdk-python) | ||
| required: true | ||
|
|
||
| jobs: | ||
| build-n-publish: | ||
| name: Build and publish Keeper SDK for Python 📦 to PyPI | ||
| name: Build and publish Keeper CLI for Python to TestPyPI | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 25 # To keep builds from running too long | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout source code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up Python 3.10 | ||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.10' | ||
| python-version: '3.11' | ||
| architecture: 'x64' | ||
|
|
||
| - name: Build the package | ||
| run: | | ||
| python -m pip install -U setuptools pip build wheel twine | ||
| python -m build --wheel | ||
| python -m build --wheel keepercli-package | ||
|
|
||
| - name: Archive the package | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: KeeperSdkWheel | ||
| name: KeeperCLIWheel | ||
| retention-days: 1 | ||
| path: dist/* | ||
| path: keepercli-package/dist/* | ||
| if-no-files-found: error | ||
|
|
||
| - name: Publish Commander to test PyPi | ||
| - name: Publish keepercli to test PyPi | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} | ||
| run: | | ||
| twine upload -r testpypi dist/* | ||
|
|
||
| twine upload -r testpypi keepercli-package/dist/* | ||
|
|
||
| publish-pypi: | ||
| name: Publish Keeper SDK to PyPi | ||
| name: Publish Keeper CLI to PyPi | ||
| runs-on: ubuntu-latest | ||
| needs: [build-n-publish] | ||
| environment: prod | ||
|
|
||
| steps: | ||
| - uses: actions/download-artifact@v3 | ||
| with: | ||
| name: CommanderWheel | ||
| path: dist | ||
| name: KeeperCLIWheel | ||
| path: keepercli-package/dist | ||
|
|
||
| - name: Set up Python 3.10 | ||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.10' | ||
| architecture: 'x64' | ||
|
|
||
| - name: Retrieve secrets from Keeper | ||
| id: ksecrets | ||
| uses: Keeper-Security/ksm-action@master | ||
| with: | ||
| keeper-secret-config: ${{ secrets.KSM_COMMANDER_SECRET_CONFIG }} | ||
| secrets: | | ||
| gD5LOOhI5QbnSFk8mIg3gg/field/password > PYPI_PASSWORD | ||
| python-version: '3.11' | ||
|
|
||
| - name: Publish to PyPi | ||
| - name: Publish keepercli to PyPi | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ steps.ksecrets.outputs.PYPI_PASSWORD }} | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_TOKEN }} | ||
| run: | | ||
| python -m pip install -U setuptools pip wheel twine | ||
| twine upload dist/* | ||
| twine upload -r pypi keepercli-package/dist/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,72 +1,96 @@ | ||
| name: Publish Keeper SDK to PyPi | ||
|
|
||
| on: [workflow_dispatch] | ||
| name: Publish Keeper SDK to PyPI | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release (tag or branch) | ||
| required: true | ||
| jobs: | ||
| build-wheel: | ||
| name: Build and publish Keeper SDK for Python 📦 to PyPI | ||
| build-and-test: | ||
| name: Build and test Keeper SDK package | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 25 # To keep builds from running too long | ||
| timeout-minutes: 25 | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout source code | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.version }} | ||
|
|
||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v4 | ||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.11' | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install keepersdk-package/ | ||
|
|
||
| - name: Run unit tests | ||
| run: python -m unittest discover -s keepersdk-package/unit_tests/ | ||
|
|
||
| - name: Build the package | ||
| run: | | ||
| python3 -m pip install -U setuptools build wheel twine | ||
| python3 -m pip install -U build wheel twine | ||
| python3 -m build --wheel keepersdk-package | ||
|
|
||
| - name: Archive the package | ||
| uses: actions/upload-artifact@v3 | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: KeeperSdkWheel | ||
| retention-days: 1 | ||
| path: keepersdk-package/dist/* | ||
| if-no-files-found: error | ||
|
|
||
| - name: Publish Commander to test PyPi | ||
| publish-test-pypi: | ||
| name: Publish to Test PyPI | ||
| runs-on: ubuntu-latest | ||
| needs: [build-and-test] | ||
| environment: test | ||
|
|
||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: KeeperSdkWheel | ||
| path: keepersdk-package/dist | ||
|
|
||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Publish to Test PyPI | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} | ||
| run: | | ||
| twine upload -r testpypi dist/* | ||
|
|
||
| python -m pip install -U twine | ||
| twine upload --repository testpypi keepersdk-package/dist/* | ||
|
|
||
| publish-pypi: | ||
| name: Publish Keeper SDK to PyPi | ||
| name: Publish to Production PyPI | ||
| runs-on: ubuntu-latest | ||
| needs: [build-wheel] | ||
| needs: [publish-test-pypi] | ||
| environment: prod | ||
|
|
||
| steps: | ||
| - uses: actions/download-artifact@v3 | ||
| with: | ||
| name: CommanderWheel | ||
| path: dist | ||
|
|
||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v4 | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| python-version: '3.11' | ||
| name: KeeperSdkWheel | ||
| path: keepersdk-package/dist | ||
|
|
||
| - name: Retrieve secrets from Keeper | ||
| id: ksecrets | ||
| uses: Keeper-Security/ksm-action@master | ||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| keeper-secret-config: ${{ secrets.KSM_COMMANDER_SECRET_CONFIG }} | ||
| secrets: | | ||
| gD5LOOhI5QbnSFk8mIg3gg/field/password > PYPI_PASSWORD | ||
| python-version: '3.13' | ||
|
|
||
| - name: Publish to PyPi | ||
| - name: Publish to PyPI | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ steps.ksecrets.outputs.PYPI_PASSWORD }} | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_TOKEN }} | ||
| run: | | ||
| python -m pip install -U setuptools pip wheel twine | ||
| twine upload dist/* | ||
| python -m pip install -U twine | ||
| twine upload keepersdk-package/dist/* |
17 changes: 9 additions & 8 deletions
17
.github/workflows/test-with-pytest.yml → .github/workflows/run-unit-tests.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,36 @@ | ||
| name: Test with pytest | ||
| name: Test with unittest | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - masterlet' | ||
| - master | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| PYTHONUNBUFFERED: 1 | ||
|
|
||
| jobs: | ||
| test-with-pytest: | ||
| test-with-unittest: | ||
| strategy: | ||
| matrix: | ||
| python-version: ['3.8', '3.14'] | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout branch | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install package with test dependencies | ||
| - name: Install package | ||
| run: | | ||
| cd keepersdk-package | ||
| pip install .[test] | ||
| pip install -e keepersdk-package/ | ||
|
|
||
| - name: Run unit tests | ||
| run: pytest keepersdk-package/unit_tests/ | ||
| run: python -m unittest discover -s keepersdk-package/unit_tests/ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions
Copilot Autofix
AI 2 months ago
To fix this issue, we need to add a
permissionsblock to thepublish-pypijob in.github/workflows/publish-cli-to-pypi.yml, as was already done for thebuild-n-publishjob. The recommended minimum starting point is to setcontents: read, which allows the job to read repository contents but not write to it. This achieves the principle of least privilege and stops jobs from having unnecessary access. To implement this, add the block after thetimeout-minutes/runs-on/needs/environmentsection but beforesteps:in thepublish-pypijob.