Giter Club home page Giter Club logo

devsecops-demo-aws-ecs's Introduction

devsecops-demo-aws-ecs's People

Contributors

ryosukedtomita avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

shahrukh0526

devsecops-demo-aws-ecs's Issues

カスタムしたReleasesを作成する方法に関して記述する

New feature description

Releasesをタグ切った際にカスタムzipを作成して配置する。

background

  • Releasesを使ってみたい

solution

name: create zip for user document upload script
on:
  release:
    types: [created]

defaults:
  run:
    shell: bash

jobs:
  create_published:
    runs-on: ubuntu-latest

    steps:
      - name: clone application source code
        uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

      - name: create zip
        run: zip -r aoai.zip .azure scripts

      - name: upload Releases
        uses: shogo82148/actions-upload-release-asset@8f032eff0255912cc9c8455797fd6d72f25c7ab7 # v1.7.5
        with:
          upload_url: ${{ github.event.release.upload_url }}
          asset_path: aoai.zip
          asset_name: aoai.zip

[Bug]: Advanced Security must be enabled for this repository to use code scanning 403: GitHub Advanced Security is not enabled

Contact Details

No response

What happened?

https://docs.github.com/ja/code-security/code-scanning/troubleshooting-code-scanning/advanced-security-must-be-enabled
自分はpublicで使っていたがorganaizationsとかprivateリポジトリだとでるらしい。
対策としてはCodeQLを使ってファイルを出力している部分を消したら消えた

        # # reportsを生成(Actionsから確認できる)
        # - name: save report as pipeline artifact
        #   uses: actions/upload-artifact@v4
        #   with:
        #     name: report.sarif
        #     path: report.sarif
        # # scanの結果を解析。GithubのSecurity --> Code Scanning等でアラートが見られる。
        # - name: publish code scanning alerts
        #   uses: github/codeql-action/upload-sarif@v2
        #   with:
        #     sarif_file: report.sarif
        #     category: semgrep

Version

1.0.2 (Default)

What browsers are you seeing the problem on?

No response

Relevant log output

GitHub Actionsにて
Advanced Security must be enabled for this repository to use code scanning 403: GitHub Advanced Security is not enabled

Code of Conduct

  • I agree to follow this project's Code of Conduct

varsを使う

GitHub Actions の vars は、リポジトリ変数(Repository Variables)を指します。これは比較的新しい機能で、機密性の低い設定値を保存するのに適しています。
リポジトリ変数(vars)の特徴:

機密性が低い情報の保存に適しています。
ワークフローファイルから直接参照できます。
リポジトリ設定から管理でき、複数のワークフローで再利用可能です。
環境ごとに異なる値を設定することができます。
GitHub UI上で値を確認できます(secrets とは異なり、マスクされません)。

一方、secrets は:

機密性の高い情報(パスワード、トークンなど)の保存に使用します。
値が常にマスクされ、ログに出力されません。
一度設定すると、値を再表示することはできません。

vars の使用例:
yaml

GitHub Actions secretについて書き忘れている

New feature description

https://docs.github.com/ja/actions/security-guides/using-secrets-in-github-actions
https://qiita.com/ak2ie/items/4fbcdf74e7760c49c1af→環境ごとにsecret切り替えられるらしい

envファイルからの一括投入も可能

 gh secret set --env development --env-file .env.development.local
 gh secret list --env development | awk '{print $1}'
VUE_APP_API_URL

${{ secrets.SuperSecret }}
取り出すときはこれ

環境の切り替えは
runs-on: ubuntu-latest
environment:
name: development # actionsのsecretの参照先を指定
こんな感じでやって取り出し方は同じ

solution

> 個々のツールの GitHub Actions の実行方法はツールごとのドキュメント参照。

かくならここ

github-pages

New feature description

github-pagesをデプロイ先にする

background

AWSにデプロイするとお金がかかるのでgithub pagesにデプロイするようにする

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.