diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 71eb90c..379acac 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,14 @@ updates: open-pull-requests-limit: 1 commit-message: prefix: ci + - package-ecosystem: gradle + directory: / + target-branch: develop + schedule: + interval: weekly + groups: + gradle: + patterns: ['*'] + open-pull-requests-limit: 1 + commit-message: + prefix: chore diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index f77c481..ecbf8fb 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -52,7 +52,7 @@ jobs: run: | case "$BASE_BRANCH:$HEAD_BRANCH" in develop:feature/*|develop:hotfix/*|develop:master|develop:dependabot/*) ;; - master:develop|master:hotfix/*|master:release-please--branches--master) ;; + master:develop|master:hotfix/*|master:release-please--branches--master|master:dependabot/*) ;; *) echo "Unsupported PR route: $HEAD_BRANCH -> $BASE_BRANCH" >&2; exit 1 ;; esac - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0 diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml new file mode 100644 index 0000000..f06aefc --- /dev/null +++ b/.github/workflows/dependency-submission.yml @@ -0,0 +1,37 @@ +name: Dependency submission + +on: + push: + branches: [master] + schedule: + - cron: '23 3 * * 1' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: dependency-submission-${{ github.ref }} + cancel-in-progress: false + +jobs: + submit: + name: Submit Gradle dependencies + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0 + with: + distribution: temurin + java-version: '21' + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1 + with: + dependency-graph: generate-and-submit + validate-wrappers: true diff --git a/SECURITY.ko.md b/SECURITY.ko.md index d26eb54..e262e86 100644 --- a/SECURITY.ko.md +++ b/SECURITY.ko.md @@ -12,6 +12,14 @@ 보안 수정은 최신 배포 버전을 대상으로 합니다. 이전 버전의 별도 유지보수는 보장하지 않습니다. 재현할 수 있도록 정확한 버전과 알고 있는 커밋을 알려주세요. +## 저장소 보호 정책 + +- Secret scanning과 푸시 보호로 지원되는 자격증명 패턴을 탐지합니다. 캡처·SQL 원문 등 민감정보는 공개 전에 별도로 검토해야 합니다. +- `master`와 `develop` 변경은 PR을 거치며, 리뷰 대화 해결, 최신 기준 브랜치 반영, GitHub Actions의 `Build and test` 및 `Windows command package` 체크를 요구합니다. Windows 검사는 `master` 대상 PR에서 실행하며 `develop` 대상 PR에서는 의도적으로 건너뜁니다. 규칙 우회는 허용하지 않습니다. 운영자가 한 명인 동안 필수 승인 수는 0명입니다. +- Dependabot 버전 업데이트는 `develop`의 GitHub Actions와 Gradle을 대상으로 합니다. 보안 업데이트 대상은 기본 브랜치인 `master`입니다. 의존성 제출 workflow는 `master` 푸시 후, 매주, 또는 `master`에서 수동 실행할 때 Gradle 의존성을 해석해 제출합니다. 저장소에 포함된 Scouter JAR은 교체할 때 출처·체크섬·취약점을 별도로 검토해야 합니다. +- CodeQL 기본 설정으로 GitHub Actions, Java/Kotlin, C/C++을 검사하며 로컬·원격 입력을 모두 분석 대상으로 삼습니다. 발견된 항목은 운영자가 검토합니다. +- Actions는 전체 커밋 SHA로 고정합니다. GitHub 소유 Actions, `gradle/actions/*`, `googleapis/release-please-action`을 허용합니다. 기본 workflow 토큰은 읽기 전용이며 필요한 작업에 추가 권한을 지정합니다. + ## 사용할 때 주의할 점 - Collector TCP는 신뢰할 수 있는 네트워크나 별도로 보안 처리한 터널에서 사용합니다. CLI가 TLS를 추가하지는 않습니다. diff --git a/SECURITY.md b/SECURITY.md index c680415..d28f5d0 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,6 +12,14 @@ If the private reporting option is unavailable, open an issue asking the maintai Security fixes target the latest published version; older versions do not have a separate maintenance commitment. Include the exact version and commit, if known, so the issue can be reproduced. +## Repository controls + +- Secret scanning and push protection detect supported credential patterns. They do not replace review of captures, SQL text, or other sensitive data before publication. +- Changes to `master` and `develop` require a pull request, resolved review conversations, an up-to-date branch, and the GitHub Actions checks `Build and test` and `Windows command package`. Windows checks run for PRs into `master` and are intentionally skipped for PRs into `develop`. No ruleset bypass is configured. The required approval count is zero while the project has one maintainer. +- Dependabot monitors GitHub Actions and Gradle version updates on `develop`. Security updates target the default branch, `master`. The dependency submission workflow resolves and submits Gradle dependencies from `master` after pushes, weekly, or by manual dispatch on `master`. The vendored Scouter JAR needs separate provenance, checksum, and vulnerability review when it changes. +- CodeQL default setup scans GitHub Actions, Java/Kotlin, and C/C++ with local and remote input sources included. Findings need maintainer triage. +- Actions must use full commit SHAs. Allowed actions are GitHub-owned actions, `gradle/actions/*`, and `googleapis/release-please-action`. The default workflow token is read-only; individual jobs request additional permissions when needed. + ## Operating boundaries - Use Collector TCP only over a trusted network or a separately secured tunnel. The CLI does not add native TLS to the Collector protocol. diff --git a/docs/releasing.md b/docs/releasing.md index 9b1571f..51ce9a6 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -9,6 +9,10 @@ 3. Review its version, changelog, release notes and checks. Merging the release PR is the publication decision: the workflow creates the tag/release and attaches the command packages. 4. Merge `master` back into `develop` so the next feature starts from the released metadata. +Both branches require pull requests, resolved review conversations, and an up-to-date branch. The required GitHub Actions checks are `Build and test` and `Windows command package`; Windows is intentionally skipped on PRs into `develop`. The single-maintainer policy requires no additional approving reviewer and grants no ruleset bypass. + +Release-please uses `GITHUB_TOKEN`. Its PR workflows may require a maintainer to select **Approve workflows to run** before CI starts; see [GitHub's token trigger rules](https://docs.github.com/en/actions/concepts/security/github_token#when-github_token-triggers-workflow-runs). If no PR check run exists, close and reopen the PR as the maintainer to trigger it. Wait for the required checks to pass before merging. Do not bypass checks to publish. Dependabot security PRs may target `master` directly; merge their fixes back into `develop` afterwards. + `feat` requests a minor release, `fix` a patch, and a breaking-change marker requests a major release. Documentation, test and CI changes alone do not request a release. For an intentional version override, preserve a one-time `Release-As: X.Y.Z` footer in the promotion commit; do not pin a permanent override in the config. ## Packages and checks