-
Notifications
You must be signed in to change notification settings - Fork 19
Omnibus #68
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
Omnibus #68
Changes from all commits
26c7932
22c1cde
ee979ff
45e3e61
8f68ce4
f48bc33
a1bb191
af4bfa8
562d897
6d2a944
f683dac
163023c
db0db08
a081cfc
5bb4915
67f1ee3
2abefe1
215bbe8
2cca4af
f41aaca
ea5f617
cfbc478
f18af75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| name: Release Docker Images | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Version to release (leave empty to use version from __init__.py)' | ||
| required: false | ||
| type: string | ||
| push_latest: | ||
| description: 'Also tag as latest' | ||
| required: true | ||
| type: boolean | ||
| default: true | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_TOKEN }} | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Determine version | ||
| id: version | ||
| run: | | ||
| if [ -n "${{ inputs.version }}" ]; then | ||
| VERSION="${{ inputs.version }}" | ||
| else | ||
| VERSION=$(grep '__version__ =' agent_memory_server/__init__.py | sed 's/__version__ = "\(.*\)"/\1/' || echo "latest") | ||
| fi | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| echo "Version to release: $VERSION" | ||
|
|
||
| - name: Build tags list | ||
| id: tags | ||
| run: | | ||
| TAGS="redislabs/agent-memory-server:${{ steps.version.outputs.version }}" | ||
| TAGS="$TAGS,ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}" | ||
|
|
||
| if [ "${{ inputs.push_latest }}" = "true" ]; then | ||
| TAGS="$TAGS,redislabs/agent-memory-server:latest" | ||
| TAGS="$TAGS,ghcr.io/${{ github.repository }}:latest" | ||
| fi | ||
|
|
||
| echo "tags=$TAGS" >> $GITHUB_OUTPUT | ||
| echo "Tags to push: $TAGS" | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security control: Static Code Analysis Semgrep Pro Yaml.Github-Actions.Security.Run-Shell-Injection.Run-Shell-Injection Using variable interpolation Severity: HIGH Why should you fix this issue? Jit Bot commands and options (e.g., ignore issue)You can trigger Jit actions by commenting on this PR review:
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: ./Dockerfile | ||
| platforms: linux/amd64,linux/arm64 | ||
| push: true | ||
| tags: ${{ steps.tags.outputs.tags }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: actions/create-release@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| tag_name: v${{ steps.version.outputs.version }} | ||
| release_name: Release v${{ steps.version.outputs.version }} | ||
| body: | | ||
| Docker images published: | ||
| - `redislabs/agent-memory-server:${{ steps.version.outputs.version }}` | ||
| - `ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}` | ||
| ${{ inputs.push_latest && format('- `redislabs/agent-memory-server:latest`{0}- `ghcr.io/{1}:latest`', '\n ', github.repository) || '' }} | ||
| draft: false | ||
| prerelease: false | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security control: Static Code Analysis Semgrep Pro
Yaml.Github-Actions.Security.Run-Shell-Injection.Run-Shell-Injection
Using variable interpolation
${{...}}withgithubcontext data in arun:step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code.githubcontext data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable withenv:to store the data and use the environment variable in therun:script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".Severity: HIGH
Learn more about this issue
Why should you fix this issue?
This code introduces a vulnerability that could compromise the security of your production environment. In production, where reliability and security are paramount, even a small vulnerability can be exploited to cause significant damage, leading to unauthorized access or service disruption.
Jit Bot commands and options (e.g., ignore issue)
You can trigger Jit actions by commenting on this PR review:
#jit_ignore_fpIgnore and mark this specific single instance of finding as “False Positive”#jit_ignore_acceptIgnore and mark this specific single instance of finding as “Accept Risk”#jit_ignore_type_in_fileIgnore any finding of type "yaml.github-actions.security.run-shell-injection.run-shell-injection" in .github/workflows/release.yml; future occurrences will also be ignored.#jit_undo_ignoreUndo ignore command