mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-08 05:18:15 +08:00
Compare commits
3 Commits
b10e09ea80
...
d427ab7aa4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d427ab7aa4 | ||
|
|
3e44fdc4d1 | ||
|
|
0365757669 |
4
.github/workflows/trivy-scan.yml
vendored
4
.github/workflows/trivy-scan.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run Trivy vulnerability scanner (source code)
|
||||
uses: aquasecurity/trivy-action@0.34.1
|
||||
uses: aquasecurity/trivy-action@0.34.2
|
||||
with:
|
||||
scan-type: "fs"
|
||||
scan-ref: "."
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
sarif_file: "trivy-results.sarif"
|
||||
|
||||
- name: Run Trivy scanner (table output for logs)
|
||||
uses: aquasecurity/trivy-action@0.34.1
|
||||
uses: aquasecurity/trivy-action@0.34.2
|
||||
if: always()
|
||||
with:
|
||||
scan-type: "fs"
|
||||
|
||||
@ -731,7 +731,12 @@ func (c *Context) SaveUploadedFile(file *multipart.FileHeader, dst string, perm
|
||||
if err = os.MkdirAll(dir, mode); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = os.Chmod(dir, mode); err != nil {
|
||||
// Only run Chmod if mode is not as configured
|
||||
info, err := os.Stat(dir)
|
||||
if err == nil && info.Mode().Perm() != mode {
|
||||
err = os.Chmod(dir, mode)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user