Browse Source

Merge branch 'main' of github.com:danielmiessler/fabric

fixed youtube
pull/199/head
Jonathan Dunn 8 months ago
parent
commit
8ad0e1ac52
  1. 4
      README.md
  2. 4
      installer/client/cli/fabric.py
  3. 4
      installer/client/cli/utils.py
  4. 31
      patterns/analyze_tech_impact/system.md
  5. 0
      patterns/analyze_tech_impact/user.md
  6. 2
      patterns/create_command/README.md
  7. 2
      patterns/create_threat_model/system.md
  8. 2
      patterns/create_visualization/system.md
  9. 2
      patterns/extract_article_wisdom/README.md
  10. 2
      patterns/extract_predictions/system.md
  11. 2
      patterns/extract_wisdom/README.md
  12. 2
      patterns/write_semgrep_rule/system.md

4
README.md

@ -221,7 +221,7 @@ options:
realtime. NOTE: You will not be able to pipe the
output into another command.
--list, -l List available patterns
--clear Clears your persistant model choice so that you can
--clear Clears your persistent model choice so that you can
once again use the --model flag
--update, -u Update patterns
--pattern PATTERN, -p PATTERN
@ -234,7 +234,7 @@ options:
--model MODEL, -m MODEL
Select the model to use. NOTE: Will not work if you
have set a default model. please use --clear to clear
persistance before using this flag
persistence before using this flag
--listmodels List all available models
--context, -c Use Context file (context.md) to add context to your
pattern

4
installer/client/cli/fabric.py

@ -37,7 +37,7 @@ def main():
parser.add_argument(
"--list", "-l", help="List available patterns", action="store_true"
)
parser.add_argument('--clear', help="Clears your persistant model choice so that you can once again use the --model flag",
parser.add_argument('--clear', help="Clears your persistent model choice so that you can once again use the --model flag",
action="store_true")
parser.add_argument(
"--update", "-u", help="Update patterns. NOTE: This will revert the default model to gpt4-turbo. please run --changeDefaultModel to once again set default model", action="store_true")
@ -49,7 +49,7 @@ def main():
help="Change the default model. For a list of available models, use the --listmodels flag.")
parser.add_argument(
"--model", "-m", help="Select the model to use. NOTE: Will not work if you have set a default model. please use --clear to clear persistance before using this flag", default="gpt-4-turbo-preview"
"--model", "-m", help="Select the model to use. NOTE: Will not work if you have set a default model. please use --clear to clear persistence before using this flag", default="gpt-4-turbo-preview"
)
parser.add_argument(
"--listmodels", help="List all available models", action="store_true"

4
installer/client/cli/utils.py

@ -265,7 +265,7 @@ class Standalone:
def fetch_available_models(self):
gptlist = []
fullOllamaList = []
claudeList = ['claude-3-opus-20240229']
claudeList = ['claude-3-opus-20240229', 'claude-3-sonnet-20240229', 'claude-2.1']
try:
headers = {
"Authorization": f"Bearer {self.client.api_key}"
@ -726,7 +726,7 @@ class Transcribe:
of a YouTube video designated with the video_id
Input:
the video id specifing a YouTube video
the video id specifying a YouTube video
an example url for a video: https://www.youtube.com/watch?v=vF-MQmVxnCs&t=306s
the video id is vF-MQmVxnCs&t=306s

31
patterns/analyze_tech_impact/system.md

@ -0,0 +1,31 @@
# IDENTITY and PURPOSE
You are a technology impact analysis service, focused on determining the societal impact of technology projects. Your goal is to break down the project's intentions, outcomes, and its broader implications for society, including any ethical considerations.
Take a moment to think about how to best achieve this goal using the following steps.
## OUTPUT SECTIONS
- Summarize the technology project and its primary objectives in a 25-word sentence in a section called SUMMARY.
- List the key technologies and innovations utilized in the project in a section called TECHNOLOGIES USED.
- Identify the target audience or beneficiaries of the project in a section called TARGET AUDIENCE.
- Outline the project's anticipated or achieved outcomes in a section called OUTCOMES. Use a bulleted list with each bullet not exceeding 25 words.
- Analyze the potential or observed societal impact of the project in a section called SOCIETAL IMPACT. Consider both positive and negative impacts.
- Examine any ethical considerations or controversies associated with the project in a section called ETHICAL CONSIDERATIONS. Rate the severity of ethical concerns as NONE, LOW, MEDIUM, HIGH, or CRITICAL.
- Discuss the sustainability of the technology or project from an environmental, economic, and social perspective in a section called SUSTAINABILITY.
- Based on all the analysis performed above, output a 25-word summary evaluating the overall benefit of the project to society and its sustainability. Rate the project's societal benefit and sustainability on a scale from VERY LOW, LOW, MEDIUM, HIGH, to VERY HIGH in a section called SUMMARY and RATING.
## OUTPUT INSTRUCTIONS
- You only output Markdown.
- Create the output using the formatting above.
- In the markdown, don't use formatting like bold or italics. Make the output maximally readable in plain text.
- Do not output warnings or notes—just the requested sections.

0
patterns/analyze_tech_impact/user.md

2
patterns/create_command/README.md

@ -28,7 +28,7 @@ python3 sqlmap -u https://example.com?test=id --random-agent --level=5 --risk=3
**prompt**
```
tool=nmap;echo -e "use $tool to target all hosts in the host.lst file even if they don't respond to pings. scan the top 10000 ports and save the ouptut to a text file and an xml file\n\n$($tool -h 2>&1)" | fabric --pattern create_command
tool=nmap;echo -e "use $tool to target all hosts in the host.lst file even if they don't respond to pings. scan the top 10000 ports and save the output to a text file and an xml file\n\n$($tool -h 2>&1)" | fabric --pattern create_command
```
**result**

2
patterns/create_threat_model/system.md

@ -84,7 +84,7 @@ Determine the chances of that realistically happening over the next, say, 10 yea
Multiply the Impact by the Likelihood for each scenario. That’s your Risk.
Add up all your Risk scores. That’s your Total Risk.
Subtract your Total Risk from your Value. If that number is positive, you are good to go. If that number is negative, it might be too risky to use based on your risk tolerance and the value of the feature.
Note that lots of things affect this, such as you realizing you actually care about this thing a lot more than you thought. Or realizing that you can mitigate some of the risk of one of the attacks by—say—putting your Alexa only in certain rooms and not others (like the bedroom or office). Now calcluate how that affects both Impact and Likelihood for each scenario, which will affect Total Risk.
Note that lots of things affect this, such as you realizing you actually care about this thing a lot more than you thought. Or realizing that you can mitigate some of the risk of one of the attacks by—say—putting your Alexa only in certain rooms and not others (like the bedroom or office). Now calculate how that affects both Impact and Likelihood for each scenario, which will affect Total Risk.
Going the opposite direction
Above we talked about going from Feature –> Attack Scenarios –> Determining if It’s Worth It.
But there’s another version of this where you start with a control question, such as:

2
patterns/create_visualization/system.md

@ -34,7 +34,7 @@ You always output ASCII art, even if you have to simplify the input concepts to
- Do not output any code indicators like backticks or code blocks or anything.
- You only ouptut the printable portion of the ASCII art. You do not ouptut the non-printable characters.
- You only output the printable portion of the ASCII art. You do not output the non-printable characters.
- Ensure the visualization can stand alone as a diagram that fully conveys the concept(s), and that it perfectly matches a written explanation of the concepts themselves. Start over if it can't.

2
patterns/extract_article_wisdom/README.md

@ -72,7 +72,7 @@ curl -sS https://github.com/danielmiessler/fabric/blob/main/extract-wisdom/dmies
## Output
Here's an abridged ouptut example from `extractwisdom` (limited to only 10 items per section).
Here's an abridged output example from `extractwisdom` (limited to only 10 items per section).
```markdown
## SUMMARY:

2
patterns/extract_predictions/system.md

@ -21,7 +21,7 @@ Take a step back and think step-by-step about how to achieve the best possible r
- Output the predictions as a bulleted list.
- Under the list, product a predictions table that includes the following columns: Prediction, Confidence, Date, How to Verify.
- Under the list, produce a predictions table that includes the following columns: Prediction, Confidence, Date, How to Verify.
- Limit each bullet to a maximum of 15 words.

2
patterns/extract_wisdom/README.md

@ -72,7 +72,7 @@ curl -sS https://github.com/danielmiessler/fabric/blob/main/extract-wisdom/dmies
## Output
Here's an abridged ouptut example from `extractwisdom` (limited to only 10 items per section).
Here's an abridged output example from `extractwisdom` (limited to only 10 items per section).
```markdown
## SUMMARY:

2
patterns/write_semgrep_rule/system.md

@ -1,6 +1,6 @@
# IDENTITY and PURPOSE
You are an expert and writing Semgrep rules.
You are an expert at writing Semgrep rules.
Take a deep breath and think step by step about how to best accomplish this goal using the following context.

Loading…
Cancel
Save