Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .difyignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ CHANGELOG.md
.env.example
uv.lock
MARKETPLACE_CHECKLIST.md
SECURITY.md
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v6
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
- name: Install locked dependencies
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
run: uv run python scripts/verify_package.py "myweather-${{ steps.release.outputs.version }}.difypkg" --source-root .
- name: Upload release package
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: plugin-package
path: myweather-${{ steps.release.outputs.version }}.difypkg
Expand All @@ -68,11 +68,14 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
needs: quality
runs-on: ubuntu-latest
# `contents: write` is required here: this job creates the GitHub Release
# for the tag and uploads the `.difypkg` as a release asset. No other job
# writes to the repository.
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: plugin-package
path: release
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,31 @@ permissions:
contents: read
actions: read
packages: read
security-events: write

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 30
# `security-events: write` lives on the job, not on the workflow: only
# this job uploads SARIF to code scanning.
permissions:
actions: read
contents: read
packages: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["python"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
languages: ${{ matrix.language }}
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
category: "/language:${{ matrix.language }}"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MyWeather

[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/AlexMultiAgent/dify-plugin-myweather/badge)](https://api.scorecard.dev/projects/github.com/AlexMultiAgent/dify-plugin-myweather)

MyWeather is a Dify weather plugin that requires no API key.

- Primary source is selectable: `open-meteo` or `wttr`
Expand Down
59 changes: 59 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Security Policy

## Reporting a vulnerability

Report suspected vulnerabilities privately through GitHub's private
vulnerability reporting form:

- https://github.com/AlexMultiAgent/dify-plugin-myweather/security/advisories/new

The form opens a private advisory that only the maintainers can read. Do not
open a public issue for a vulnerability report.

If the advisory form is unavailable, the maintainer contact declared in
`manifest.yaml` is `AlexMultiAgent@users.noreply.github.com`. That is a GitHub
noreply address, so prefer the advisory form above.

## What counts as a vulnerability

MyWeather is a Python plugin that runs inside the Dify plugin daemon. In scope:

- A crafted `location` query that makes the plugin read files outside its own
directory, escape the plugin sandbox, or run unexpected code.
- Path traversal or unsafe file handling in the lookup or packaging logic.
- An upstream provider request that is manipulated into returning data the tool
did not document, or into leaking user input to a third party.
- A vulnerable runtime dependency that is reachable from the shipped code.

Out of scope:

- Wrong or missing weather data, or a place name that resolves to the wrong
location.
- Unavailability of wttr.in or Open-Meteo.
- Issues in Dify, in the plugin daemon, or in the upstream providers.

## What to expect

- We aim to acknowledge a report within 7 days and to publish a fix or an
advisory within 90 days of the acknowledgement.
- We keep the advisory private while the fix is prepared and released.
- We credit the reporter in the advisory unless anonymity is requested.

## Disclosure

- Public disclosure happens through a GitHub Security Advisory on this
repository, together with the release that carries the fix.
- The disclosure timeline is 90 days from acknowledgement. If a fix needs
longer, we publish an advisory that explains the delay.
- We ask reporters to keep the details of any vulnerabilities private until
the disclosure date.

## Supported versions

| Version | Supported |
| --- | --- |
| 0.1.4 | Yes — current published release |
| 0.1.5 | In development; supported once published |

Only the latest published release receives fixes; older versions are not
maintained.
1 change: 1 addition & 0 deletions scripts/verify_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
".gitignore",
"CHANGELOG.md",
"MARKETPLACE_CHECKLIST.md",
"SECURITY.md",
"uv.lock",
}
)
Expand Down
Loading