r/aws_bedrockagentcore_memory_strategy: Replace resource rather than erroring when configuration.consolidation, configuration.extraction, or configuration.reflection blocks are removed
#45166
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
| # Copyright IBM Corp. 2014, 2026 | |
| # "SPDX-License-Identifier: MPL-2.0" | |
| name: Semgrep Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release/**' | |
| pull_request: | |
| paths: | |
| - internal/** | |
| - .semgrep*yml | |
| - .ci/semgrep* | |
| - .ci/semgrep/** | |
| - .ci/.semgrep* | |
| - .github/workflows/semgrep-ci.yml | |
| ## NOTE: !!! | |
| ## When changing these workflows, ensure that the following is updated: | |
| ## - Documentation: docs/continuous-integration.md | |
| ## - Documentation: docs/makefile-cheat-sheet.md | |
| ## - Makefile: ./GNUmakefile | |
| env: | |
| SEMGREP_SEND_METRICS: "off" | |
| SEMGREP_ENABLE_VERSION_CHECK: false | |
| SEMGREP_TIMEOUT: 300 | |
| SEMGREP_ARGS: --error --quiet | |
| permissions: | |
| contents: read # required for checkout | |
| jobs: | |
| semgrep-validate: | |
| name: Validate Code Quality Rules | |
| runs-on: ubuntu-latest | |
| container: | |
| image: &semgrep_image "semgrep/semgrep:1.168.0" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: | | |
| semgrep --validate \ | |
| --config .ci/.semgrep.yml \ | |
| --config .ci/.semgrep-constants.yml \ | |
| --config .ci/.semgrep-test-constants.yml \ | |
| --config .ci/semgrep/ | |
| semgrep-test: | |
| name: Semgrep Rule Tests | |
| needs: [semgrep-validate] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: *semgrep_image | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: | | |
| semgrep --quiet --test .ci/semgrep/ | |
| semgrep --quiet --test --config .ci/semgrep-caps-aws-ec2.yml .ci/semgrep-caps-aws-ec2.go | |
| constants: | |
| name: Constants Check (make semgrep-constants) | |
| needs: [semgrep-test] | |
| runs-on: custom-ubuntu-22.04-large | |
| container: | |
| image: *semgrep_image | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: | | |
| semgrep $SEMGREP_ARGS \ | |
| --config .ci/.semgrep-constants.yml \ | |
| --config .ci/.semgrep-test-constants.yml | |
| semgrep: | |
| name: Code Quality Scan (make semgrep-code-quality) | |
| needs: [semgrep-test] | |
| runs-on: custom-ubuntu-22.04-large | |
| container: | |
| image: *semgrep_image | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: | | |
| semgrep $SEMGREP_ARGS \ | |
| --config .ci/.semgrep.yml \ | |
| --config .ci/semgrep/ \ | |
| --config 'r/dgryski.semgrep-go.anon-struct-args' \ | |
| --config 'r/dgryski.semgrep-go.badnilguard' \ | |
| --config 'r/dgryski.semgrep-go.contextcancelable' \ | |
| --config 'r/dgryski.semgrep-go.ctx-time' \ | |
| --config 'r/dgryski.semgrep-go.errnilcheck' \ | |
| --config 'r/dgryski.semgrep-go.ioutil' \ | |
| --config 'r/dgryski.semgrep-go.mail-address' \ | |
| --config 'r/dgryski.semgrep-go.marshaljson' \ | |
| --config 'r/dgryski.semgrep-go.nilerr' \ | |
| --config 'r/dgryski.semgrep-go.oddcompare' \ | |
| --config 'r/dgryski.semgrep-go.oddifsequence' \ | |
| --config 'r/dgryski.semgrep-go.oserrors' \ | |
| --config 'r/dgryski.semgrep-go.parseint-downcast' \ | |
| --config 'r/dgryski.semgrep-go.readeof' \ | |
| --config 'r/dgryski.semgrep-go.readfull' \ | |
| --config 'r/dgryski.semgrep-go.sprinterr' \ | |
| --config 'r/dgryski.semgrep-go.unixnano' \ | |
| --config 'r/dgryski.semgrep-go.writestring' \ | |
| --config 'r/dgryski.semgrep-go.wrongerrcall' | |
| naming_cae: | |
| name: Naming Scan Caps/AWS/EC2 (make semgrep-naming-cae) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: *semgrep_image | |
| if: (github.action != 'dependabot[bot]') | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: semgrep --validate --config .ci/semgrep-caps-aws-ec2.yml | |
| - run: semgrep $SEMGREP_ARGS --config .ci/semgrep-caps-aws-ec2.yml | |
| naming_tests: | |
| name: Test Configs Scan (make semgrep-naming) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: *semgrep_image | |
| if: (github.action != 'dependabot[bot]') | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: semgrep --validate --config .ci/.semgrep-configs.yml | |
| - run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-configs.yml | |
| naming_semgrep0: | |
| name: Service Name Scan A-C (make semgrep-service-naming) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: *semgrep_image | |
| if: (github.action != 'dependabot[bot]') | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: semgrep --validate --config .ci/.semgrep-service-name0.yml | |
| - run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name0.yml | |
| naming_semgrep1: | |
| name: Service Name Scan C-I (make semgrep-service-naming) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: *semgrep_image | |
| if: (github.action != 'dependabot[bot]') | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: semgrep --validate --config .ci/.semgrep-service-name1.yml | |
| - run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name1.yml | |
| naming_semgrep2: | |
| name: Service Name Scan I-Q (make semgrep-service-naming) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: *semgrep_image | |
| if: (github.action != 'dependabot[bot]') | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: semgrep --validate --config .ci/.semgrep-service-name2.yml | |
| - run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name2.yml | |
| naming_semgrep3: | |
| name: Service Name Scan Q-Z (make semgrep-service-naming) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: *semgrep_image | |
| if: (github.action != 'dependabot[bot]') | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - run: semgrep --validate --config .ci/.semgrep-service-name3.yml | |
| - run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name3.yml |